relay-tools / react-relay-network-modern-ssr

SSR middleware for react-relay-network-modern
https://github.com/relay-tools/react-relay-network-modern-ssr
MIT License
67 stars 10 forks source link

How to use with remote schemas? #2

Closed damassi closed 6 years ago

damassi commented 6 years ago

Noticed a required parameter is schema -- but currently I don't have access to that. Example setup from a GraphQL-consuming app:

const network = new RelayNetworkLayer([
  urlMiddleware({ url: 'http://graphql.myserver.com' }),
  relayServerSSR.getMiddleware({
    // schema, -- don't have access? Or pass in `.graphql` or `.json` output?
    contextValue: {},
  }),