Skip to content

Instantly share code, notes, and snippets.

@kluu1
Last active March 23, 2020 15:46
Show Gist options
  • Select an option

  • Save kluu1/f9a2c7e140d0fa40c0c07ae9254a9b26 to your computer and use it in GitHub Desktop.

Select an option

Save kluu1/f9a2c7e140d0fa40c0c07ae9254a9b26 to your computer and use it in GitHub Desktop.
import { gql } from 'apollo-server-micro'
const typeDefs = gql`
type Coin {
id: String!
currency: String!
name: String!
logo_url: String!
rank: String!
price: String!
price_date: String!
market_cap: String
circulating_supply: String
max_supply: String
}
type CoinDetails {
volume: String!
price_change: String!
price_change_pct: String!
volume_change: String!
volume_change_pct: String!
market_cap_change: String!
market_cap_change_pct: String!
}
type Query {
getCoins: [Coin]
getCoinDetails(coinid: String!, interval: String!): CoinDetails
}
`
export default typeDefs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment