Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const schemaData = parsed.data
? parsed.data.__schema
: parsed.__schema
? parsed.__schema
: parsed;
return schemaData;
}
if (ext === ".graphql" || ext === ".graphqls" || ext === ".gql") {
return await buildIntrospectionSchemaFromSDL(new Source(result, file));
}
if (ext === ".ts" || ext === ".tsx" || ext === ".js" || ext === ".jsx") {
return await buildIntrospectionSchemaFromSDL(
extractDocumentFromJavascript(result)!
);
}
return;
}