-
Notifications
You must be signed in to change notification settings - Fork 532
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Begin re-organizing files to follow Apollo tuts
- Loading branch information
1 parent
2e48eee
commit 943dd33
Showing
4 changed files
with
41 additions
and
36 deletions.
There are no files selected for viewing
File renamed without changes.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
Query: { | ||
pokemon: async (_source, { id }, { dataSources }) => { | ||
return dataSources.pokemonAPI.getPokemon(id) | ||
}, | ||
}, | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
const { gql } = require('apollo-server-cloudflare') | ||
|
||
module.exports = gql` | ||
type PokemonSprites { | ||
front_default: String! | ||
front_shiny: String! | ||
front_female: String! | ||
front_shiny_female: String! | ||
back_default: String! | ||
back_shiny: String! | ||
back_female: String! | ||
back_shiny_female: String! | ||
} | ||
type Pokemon { | ||
id: ID! | ||
name: String! | ||
height: Int! | ||
weight: Int! | ||
sprites: PokemonSprites! | ||
} | ||
type Query { | ||
pokemon(id: ID!): Pokemon | ||
} | ||
` |