Created
June 8, 2018 15:33
-
-
Save daniele-zurico/79ed2ba391f17b6e51c04553d0405bde to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| import { | |
| addMockFunctionsToSchema, | |
| gql, | |
| makeExecutableSchema | |
| } from "apollo-server"; | |
| import { GraphQLSchema } from "graphql"; | |
| const userSchema: GraphQLSchema = makeExecutableSchema({ | |
| typeDefs: gql` | |
| type Query { | |
| users: [User] | |
| validateUser(idToken: String): User | |
| } | |
| type User { | |
| _id: String | |
| email: String | |
| name: String | |
| picture: String | |
| given_name: String | |
| family_name: String | |
| locale: String | |
| } | |
| ` | |
| }); | |
| addMockFunctionsToSchema({ schema: userSchema }); | |
| export default userSchema; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment