mirror of
https://github.com/element-hq/matrix-authentication-service.git
synced 2026-05-13 21:33:32 +00:00
9bde01df5b
This removes the unified GraphQL cache, as invalidation is annoying. It also fixes inconsistent codegen behaviors.
30 lines
830 B
TypeScript
30 lines
830 B
TypeScript
// Copyright 2024 New Vector Ltd.
|
|
// Copyright 2023, 2024 The Matrix.org Foundation C.I.C.
|
|
//
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
// Please see LICENSE in the repository root for full details.
|
|
|
|
import type { CodegenConfig } from "@graphql-codegen/cli";
|
|
|
|
const config: CodegenConfig = {
|
|
schema: "./schema.graphql",
|
|
documents: ["src/**/*.{tsx,ts}", "!src/gql/**/*"],
|
|
ignoreNoDocuments: true, // for better experience with the watcher
|
|
generates: {
|
|
"./src/gql/": {
|
|
preset: "client",
|
|
config: {
|
|
useTypeImports: true,
|
|
// By default, unknown scalars are generated as `any`. This is not ideal for catching potential bugs.
|
|
defaultScalarType: "unknown",
|
|
scalars: {
|
|
DateTime: "string",
|
|
Url: "string",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|
|
export default config;
|