0.2.2 • Published 5 years ago
@highfivesfoundation/schema-provider v0.2.2
Schema Provider
Home of the High Fives Foundation GraphQL Schema.
Starting Mock Apollo Server
To run a mock GraphQL server locally you can use the h5-server
command:
{
"scripts": {
"start:server": "h5-mock-server"
}
}
Incorporating typeDefs and Mocks
The typeDefs
and mocks
can be imported from npm and used to build an Apollo
Server:
const { ApolloServer } = require('apollo-server')
const { typeDefs, mocks } = require('@highfivesfoundation/schema-provider')
const resolvers = {}
var server = new ApolloServer({
typeDefs,
resolvers,
mocks
})
server
.listen()
.then(({ url }) => `running at ${url}`)
.then(console.log)
.catch(console.error)
Mock Authorization
If you want the mock server to return a sample authorized user, send any
Authorization
header.
0.2.2
5 years ago
0.2.1
5 years ago
0.2.0
6 years ago
0.1.11
6 years ago
0.1.10
6 years ago
0.1.9
6 years ago
0.1.8
6 years ago
0.1.7
6 years ago
0.1.6
6 years ago
0.1.5
6 years ago
0.1.4
6 years ago
0.1.3
6 years ago
0.1.2
6 years ago
0.1.1
6 years ago
0.1.0
6 years ago
0.0.12
6 years ago
0.0.11
6 years ago
0.0.10
6 years ago
0.0.9
6 years ago
0.0.8
6 years ago
0.0.7
6 years ago
0.0.6
6 years ago
0.0.5
6 years ago
0.0.4
6 years ago
0.0.3
6 years ago
0.0.2
6 years ago
0.0.1
6 years ago
0.0.0
6 years ago