mirror of
https://github.com/instructure/canvas-lms.git
synced 2026-03-09 21:47:48 +08:00
refs CFA-439 flag=none Change-Id: Id1eff002c10f6c61acc63636dc352584fa6631c9 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/401405 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Isaac Moore <isaac.moore@instructure.com> QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com> Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
52 lines
1.5 KiB
TypeScript
52 lines
1.5 KiB
TypeScript
/*
|
|
* Copyright (C) 2025 - present Instructure, Inc.
|
|
*
|
|
* This file is part of Canvas.
|
|
*
|
|
* Canvas is free software: you can redistribute it and/or modify it under
|
|
* the terms of the GNU Affero General Public License as published by the Free
|
|
* Software Foundation, version 3 of the License.
|
|
*
|
|
* Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
* A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
* details.
|
|
*
|
|
* You should have received a copy of the GNU Affero General Public License along
|
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
import type {CodegenConfig} from '@graphql-codegen/cli'
|
|
|
|
const config: CodegenConfig = {
|
|
schema: './schema.graphql',
|
|
documents: [
|
|
'ui/**/*.tsx',
|
|
'ui/**/*.ts',
|
|
'ui/**/*.jsx',
|
|
'ui/**/*.js',
|
|
'!ui/**/__tests__/**/*',
|
|
'!ui/**/*.test.*',
|
|
'!ui/**/Mocks.*',
|
|
'!ui/features/grade_summary/**/*',
|
|
// Self-contained graphql modules with internal fragment systems - excluded to avoid duplicate names
|
|
// TODO: Refactor these to use unique fragment names, then remove exclusions
|
|
'!ui/features/discussion_topic_edit_v2/graphql/**/*',
|
|
'!ui/shared/outcomes/react/treeBrowser.*',
|
|
],
|
|
ignoreNoDocuments: true,
|
|
generates: {
|
|
'./ui/shared/graphql/codegen/': {
|
|
preset: 'client',
|
|
presetConfig: {
|
|
fragmentMasking: false,
|
|
},
|
|
config: {
|
|
enumsAsTypes: true,
|
|
},
|
|
},
|
|
},
|
|
}
|
|
|
|
export default config
|