Skip to content

Instantly share code, notes, and snippets.

@samueljoli
Created October 6, 2017 02:58
Show Gist options
  • Save samueljoli/7cdd45c72825893ba924c79dcc6ae9e5 to your computer and use it in GitHub Desktop.
Save samueljoli/7cdd45c72825893ba924c79dcc6ae9e5 to your computer and use it in GitHub Desktop.
GraphQL raw
const Response = new graphql.GraphQLObjectType({
name: 'Response',
fields: {
prop1: { type: graphql.GraphQLID },
prop2: { type: graphql.GraphQLString },
prop3: { type: graphql.GraphQLInt },
prop4: { type: graphql.GraphQLFloat },
prop5: {
type: new graphql.GraphQLObjectType({
name: 'SubField',
fields: {
key1: { type: graphql.GraphQLInt },
key2: { type: graphql.GraphQLBoolean }
}
})
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment