Skip to content

Instantly share code, notes, and snippets.

@barsumek
Created November 22, 2018 10:27
Show Gist options
  • Save barsumek/b30408fd53be06e2fa1261a5bd83df56 to your computer and use it in GitHub Desktop.
Save barsumek/b30408fd53be06e2fa1261a5bd83df56 to your computer and use it in GitHub Desktop.
Detox your GraphQL: Schema types definitions
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