Setup
Install Kimera and a GraphQL server to get started.
note
This page walks you through the steps you need to take in order to get a Kimera server working. You can see an example of a working Kimera server in the GitHub repository.
Installing Kimera
To install Kimera you can install it via npm or yarn, it's totally up to you. We're guessing that you'll most likely want Kimera to be a dev dependency.
or if you want to use yarn
Using Kimera
To use Kimera, you'll need a GraphQL server, and the schema definitions.
We'll use Apollo Server for the server, but any GraphQL server would work. See how to install Apollo Server in the Apollo docs.
Running this code with node
will start a server on localhost:4000
. Visiting the URL will predictably take us to the GraphQL Playground.
Running the me
query...
...will return mocked data:
Next , let's see how we can customize those mocks.