-1
How do I join all the SCHEMAS that have been created.
import { mergeTypeDefs } from '@graphql-tools/merge';
import { loadFilesSync } from '@graphql-tools/load-files';
import path from 'path';
const typesArray = loadFilesSync(
path.join(__dirname, 'modules', '**', 'infra', 'graphql', '*.gql'),
{ extensions: ['graphql'] },
);
const MergeTypes = mergeTypeDefs(typesArray);
console.log(MergeTypes);
export default MergeTypes;
{ Kind: 'Document', Definitions: [] }
Error: Query root type must be provided.
I was supposed to log all unified schemas not?
I’ve been in the doc, but I didn’t understand anything: https://www.graphql-tools.com/docs/migration/migration-from-merge-graphql-schemas
You can display the contents of
typesArray
?– Sergio