Skip to content

Commit

Permalink
done
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Apr 25, 2024
1 parent 6812d9b commit f8bb7aa
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/graphqlsp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"typescript": "^5.3.3"
},
"dependencies": {
"@gql.tada/internal": "0.3.0-canary-3c09253dc57ece41320907f966ceceb5265b2b49",
"@gql.tada/internal": "0.3.0-canary-3d3d6fa74e6a37ac25a932c1a03b10873ecb040c",
"graphql": "^16.8.1",
"node-fetch": "^2.0.0"
},
Expand Down
28 changes: 22 additions & 6 deletions packages/graphqlsp/src/graphql/getSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,17 +135,33 @@ export const loadSchema = (
Object.values(ref.multi).forEach(value => {
if (!value) return;

if (value.tadaOutputLocation) {
saveTadaIntrospection(
value.introspection,
path.resolve(rootPath, value.tadaOutputLocation),
tadaDisablePreprocessing,
logger
);
}
});
}

ref.autoupdate((schemaRef, value) => {
if (!value) return;

if (value.tadaOutputLocation) {
const found = schemaRef.multi
? schemaRef.multi[value.name as string]
: schemaRef.current;
if (!found) return;
saveTadaIntrospection(
value.introspection,
// TODO: do we want to expose the tadaOutputLocation here
found.introspection,
path.resolve(rootPath, value.tadaOutputLocation),
tadaDisablePreprocessing,
logger
);
});
}

ref.autoupdate();
}
});
})();

return ref;
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f8bb7aa

Please sign in to comment.