Last active
June 20, 2019 09:32
-
-
Save nikolasburk/fbbb47a21d491ecc6ab3083230197678 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
const UserType = new GraphQLObjectType({ | |
name: 'User', | |
fields: { | |
id: { type: GraphQLID }, | |
name: { type: GraphQLString }, | |
}, | |
}) | |
const schema = new GraphQLSchema({ | |
query: new GraphQLObjectType({ | |
name: 'Query', | |
fields: { | |
user: { | |
type: UserType, | |
resolve: () => ({ id: 1, name: "Alice" }) | |
}, | |
}, | |
}), | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment