mirror of
https://github.com/graphql-hive/console
synced 2026-05-24 09:38:26 +00:00
Use version.compositeSchemaSDL instead of keep recomposing the schema (#3329)
This commit is contained in:
parent
1575d93751
commit
bc06103cf9
2 changed files with 15 additions and 0 deletions
|
|
@ -36,6 +36,15 @@ export const resolvers: LabModule.Resolvers = {
|
|||
return null;
|
||||
}
|
||||
|
||||
if (latestSchema.compositeSchemaSDL) {
|
||||
return {
|
||||
schema: latestSchema.compositeSchemaSDL,
|
||||
mocks: {},
|
||||
};
|
||||
}
|
||||
|
||||
// Legacy Fallback
|
||||
|
||||
const [
|
||||
schemas,
|
||||
{ type, externalComposition, nativeFederation, legacyRegistryModel },
|
||||
|
|
|
|||
|
|
@ -935,6 +935,12 @@ export const resolvers: SchemaModule.Resolvers = {
|
|||
.then(r => r.supergraph);
|
||||
},
|
||||
async sdl(version, _, { injector }) {
|
||||
if (version.compositeSchemaSDL) {
|
||||
return version.compositeSchemaSDL;
|
||||
}
|
||||
|
||||
// Legacy Fallback
|
||||
|
||||
const [project, organization] = await Promise.all([
|
||||
injector.get(ProjectManager).getProject({
|
||||
organization: version.organization,
|
||||
|
|
|
|||
Loading…
Reference in a new issue