Created
July 21, 2020 21:09
-
-
Save mlg87/209d38f692b26097183afb94a3f83467 to your computer and use it in GitHub Desktop.
Using Apollo Client for global state management code samples - localSchema.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ./localSchema.js | |
const { loadFilesSync } = require("@graphql-tools/load-files"); | |
const { mergeTypeDefs } = require("@graphql-tools/merge"); | |
const loadedFiles = loadFilesSync(`${__dirname}/src/**/schema.js`); | |
module.exports.schema = mergeTypeDefs(loadedFiles); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment