Skip to content

Instantly share code, notes, and snippets.

@Rafe
Created November 18, 2021 16:48
Show Gist options
  • Save Rafe/f3addf1bb0a041329ecd947f0f5c347c to your computer and use it in GitHub Desktop.
Save Rafe/f3addf1bb0a041329ecd947f0f5c347c to your computer and use it in GitHub Desktop.
>> GraphQL.parse(query)
=> # <GraphQL::Language::Nodes::Document:0x00007fcd9c4dea10
@definitions=
[#<GraphQL::Language::Nodes::OperationDefinition:0x00007fcd9c4deb28
@operation_type="query",
@selections=
[#<GraphQL::Language::Nodes::Field:0x00007fcd9c4dec68
@arguments=
[#<GraphQL::Language::Nodes::Argument:0x00007fcd9c4df870
@name="id",
@value=1>],
@name="user",
@selections=
[#<GraphQL::Language::Nodes::Field:0x00007fcd9c4df690
@arguments=[],
@directives=[],
@name="id",
@selections=[]>,
...,
#<GraphQL::Language::Nodes::Field:0x00007fcd9c4deda8
@arguments=[],
@directives=[],
@name="cartItems",
@selections=
[...,
#<GraphQL::Language::Nodes::Field:0x00007fcd9c4deee8
@arguments=[],
@directives=[],
@name="price",
@selections=[]>]>]>],
@variables=[]>],
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment