Created
November 22, 2018 10:27
-
-
Save barsumek/b30408fd53be06e2fa1261a5bd83df56 to your computer and use it in GitHub Desktop.
Detox your GraphQL: Schema types definitions
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
const { gql } = require("apollo-server-express"); | |
const schemaString = gql` | |
scalar Date | |
enum PokemonType { | |
Normal | |
Fire | |
Water | |
Grass | |
} | |
type Query { | |
trainer: Trainer | |
myPokemon: Pokemon | |
} | |
type Trainer { | |
id: Int | |
name: String | |
} | |
type Pokemon { | |
id: Int | |
name: String | |
type: PokemonType | |
level: Int | |
catchDate: Date | |
} | |
`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment