Skip to content

Instantly share code, notes, and snippets.

@miracle2k
Created September 29, 2015 06:55
Show Gist options
  • Save miracle2k/d4a28ea02279fa47e532 to your computer and use it in GitHub Desktop.
Save miracle2k/d4a28ea02279fa47e532 to your computer and use it in GitHub Desktop.
What RelayQL strings look like after going through the generator.
var GraphQL = Relay.QL.__GraphQL;
return new GraphQL.QueryFragment(
'Builder', 'AddMenuItemPayload',
[new GraphQL.Field('node', null, null, null, null, null, {parentType: 'AddMenuItemPayload'}),
new GraphQL.Field('client', [
new GraphQL.Field('menuitems', [
new GraphQL.Field('count', null, null, null, null, null, {parentType: 'MenuItemConnection'})],
null,
[new GraphQL.Callv('first', new GraphQL.CallVariable('format'))],
null, null, {parentType: 'Client', connection: true, nonFindable: true}),
new GraphQL.Field('id', null, null, null, null, null, {parentType: 'Client', generated: true, requisite: true})
],
null, null, null, null, {parentType: 'AddMenuItemPayload'})]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment