Skip to content

Instantly share code, notes, and snippets.

@Turbiani
Last active February 15, 2018 13:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Turbiani/494466ffed8406f3872fa7de152150ab to your computer and use it in GitHub Desktop.
Save Turbiani/494466ffed8406f3872fa7de152150ab to your computer and use it in GitHub Desktop.
GraphQL Resolver example
{
Query: {
getUserByEmail: (root, args, context, info) => context.db.findUserByEmail(args.email),
},
User: {
name: (root, args, context, info) => root.name,
email: (root, args, context, info) => root.email,
},
}
@reinaldooli
Copy link

Na linha 6, name está "resolvendo" para email

@Turbiani
Copy link
Author

valeu @reinando era o sono rsrsrs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment