Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
quasis.forEach((chunk, ii) => {
chunks.push(chunk);
if (ii !== quasis.length - 1) {
const name = 'RQL_' + ii;
const value = expressions[ii];
runtime.fragments[name] = value;
substitutions.push({name, value});
if (/:\s*$/.test(chunk)) {
invariant(
false, // this.options.substituteVariables,
'You supplied a GraphQL document named `%s` that uses template ' +
'substitution for an argument value, but variable substitution ' +
'has not been enabled.',
documentName
);
chunks.push('$' + name);
variableNames[name] = undefined;
} else {
chunks.push('...' + name);
}
}
});
function getSchema(schemaProvider: GraphQLSchemaProvider): GraphQLSchema {
const introspection = typeof schemaProvider === 'function' ?
schemaProvider() :
schemaProvider;
invariant(
typeof introspection === 'object' && introspection &&
typeof introspection.__schema === 'object' && introspection.__schema,
'Invalid introspection data supplied to `getBabelRelayPlugin()`. The ' +
'resulting schema is not an object with a `__schema` property.'
);
return buildClientSchema(introspection);
}