18 lines
516 B
JavaScript
18 lines
516 B
JavaScript
const { gql } = require('apollo-server');
|
|
|
|
// Type definitions define the "shape" of your data and specify
|
|
// which ways the data can be fetched from the GraphQL server.
|
|
module.exports = gql`
|
|
# Comments in GraphQL are defined with the hash (#) symbol.
|
|
# This "Store" type can be used in other type declarations.
|
|
type Store {
|
|
id: String
|
|
name: String
|
|
}
|
|
|
|
# The "Query" type is the root of all GraphQL queries.
|
|
# (A "Mutation" type will be covered later on.)
|
|
type Query {
|
|
stores: [Store]
|
|
}
|
|
`; |