https://github.com/graphqlguide/mock-external-schema
Use Apollo Server to mock an external schema
https://github.com/graphqlguide/mock-external-schema
Last synced: 7 months ago
JSON representation
Use Apollo Server to mock an external schema
- Host: GitHub
- URL: https://github.com/graphqlguide/mock-external-schema
- Owner: GraphQLGuide
- Created: 2020-02-12T09:16:00.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-22T14:14:30.000Z (about 3 years ago)
- Last Synced: 2025-06-05T22:17:14.472Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 365 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Mock any GraphQL schema. All you need is a `schema.json` or the URL of a GraphQL server that has introspection enabled.
Steps:
- Update the schema to the one you want by either:
- Replacing `schema.json`, or
- Replacing `https://api.spacex.land/graphql` in `package.json` and running `npm run update-schema`
- Running `npm start`
- Opening [localhost:4000](http://localhost:4000) and querying with Playground
Mocking docs: https://www.apollographql.com/docs/apollo-server/testing/mocking/
