Skip to content

Instantly share code, notes, and snippets.

@AgustinCastella
Created April 13, 2021 20:04
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 AgustinCastella/b8c69af615af8dfb541d667e71e11aff to your computer and use it in GitHub Desktop.
Save AgustinCastella/b8c69af615af8dfb541d667e71e11aff to your computer and use it in GitHub Desktop.
Define a resolver
// Resolvers define the technique for fetching the types defined in the
// schema. This resolver retrieves books from the "books" array above.
const resolvers = {
Query: {
books: () => books,
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment