Created
December 31, 2020 12:48
-
-
Save mr-pascal/db09bea3a61d15cb74182f068030210e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/index.ts | |
const resolvers = { | |
Query: { | |
/** | |
* Simple resolver to add two numbers | |
* @param {object} _ | |
* @param {number} x First number | |
* @param {number} y Second number | |
*/ | |
add: async (_: unknown, {x, y}: { x: number, y: number }): Promise<number> => x + y, | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment