Skip to content

Commit a1b9c8c

Browse files
committed
misc(FR-2000): update graphql.config.ts to support GraphQL extensions (#5183)
resolves #5182 (FR-2000) This PR converts the GraphQL configuration from JavaScript to TypeScript and updates the file paths to reflect the current project structure: - Renamed `graphql.config.js` to `graphql.config.ts` and changed module export syntax to use ES modules - Updated schema paths to point to the correct locations - Added `merged_schema.graphql` and `client-directives.graphql` to the schema list - Extended document paths to include files in the `packages/backend.ai-ui/src` directory - Added `graphql.config.ts` to the TypeScript configuration's include list **Checklist:** (if applicable) - [ ] Documentation - [ ] Minium required manager version - [ ] Specific setting for review (eg., KB link, endpoint or how to setup) - [ ] Minimum requirements to check during review - [ ] Test case(s) to demonstrate the difference of before/after
1 parent efc30ca commit a1b9c8c

2 files changed

Lines changed: 15 additions & 4 deletions

File tree

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1-
module.exports = {
1+
export default {
22
schema: [
33
// To update graphql schema, run `./backend.ai mgr gql show` and copy the output to schema.graphql
4-
"./react/data/schema.graphql",
4+
"./data/schema.graphql",
5+
"./data/merged_schema.graphql",
6+
"./data/client-directives.graphql",
57
// "./react/data/relay-and-local-directives-for-graphql-config.graphql"
68

79
// WARN: This file is generated by `yarn relay` and should not be edited manually.
810
// './react/data/merged_schema.graphql',
911
],
10-
documents: ['./react/src/**/*.{graphql,ts,tsx}'],
12+
documents: [
13+
"./react/src/**/*.{graphql,ts,tsx}",
14+
"./packages/backend.ai-ui/src/**/*.{graphql,ts,tsx}",
15+
],
1116
extensions: {
1217
languageService: {
1318
cacheSchemaFileForLookup: true,

tsconfig.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,11 @@
2525
"lib": ["es6", "dom", "es2016", "es2017", "es2020"],
2626
"preserveWatchOutput": true
2727
},
28-
"include": ["src/components/*", "src/plugins/*", "src/reducers/*", "src/*"]
28+
"include": [
29+
"src/components/*",
30+
"src/plugins/*",
31+
"src/reducers/*",
32+
"src/*",
33+
"graphql.config.ts"
34+
]
2935
}

0 commit comments

Comments
 (0)