Skip to content

Instantly share code, notes, and snippets.

@zgababa
Created January 18, 2017 14:15
Show Gist options
  • Save zgababa/792c9afc91f4aaf28b1b3af503849f69 to your computer and use it in GitHub Desktop.
Save zgababa/792c9afc91f4aaf28b1b3af503849f69 to your computer and use it in GitHub Desktop.
'use strict';
const graphql = require('graphql');
const pokemonType = new graphql.GraphQLObjectType({
name : 'PokemonType',
fields : {
id : {
type : graphql.GraphQLString
},
name : {
type : graphql.GraphQLString
},
order : {
type : graphql.GraphQLInt
},
img : {
type : graphql.GraphQLString,
resolve : (pokemon) => pokemon.sprites.front_default
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment