Themis

Themis

  • Docs
  • Roadmap

›Guides

Getting Started

  • What is this about?
  • Installation
  • Create a Module

Guides

  • Remote Module
  • Nocks

API

  • Module
  • Remote Module
  • Transforms
  • Merge Strategy
  • CLI

Configuration

  • Configuration File
  • ENV

Remote Module Guide

Themis supports remote schemas and uses the introspection result from another GraphQL endpoint to create a remote executable schema. A remote module does not need a local schema and resolvers, instead it specifies a remote endpoint.

Example Remote Module

Create a file called remote-hello.js and fill it with:

module.exports = {
  name: 'remote-hello',
  remote: {
    uri: 'http://127.0.0.1:8585/api/graphql'
  }
}

Now start the hello.js example from the Getting Started guide (or from the examples in the repository) at port 8585 like so:

PORT=8585 themis hello.js

Then start the remote example at the default port:

themis remote-hello.js

Goto localhost:8484/api/graphql to open GraphQL Playground. You should now be able to query data from the remote endpoint.

{
  hello
}
← Create a ModuleNocks →
  • Example Remote Module
Docs
Getting StartedModule API Reference
Copyright © 2019 Spring-Media