Created
January 18, 2017 14:15
-
-
Save zgababa/792c9afc91f4aaf28b1b3af503849f69 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
'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