mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-04 14:00:22 -05:00
924ce03bd2
* get basic header bar working in frontend-shared * move basic header bar to /gql-components * complete initial move of main header bar * show header only on non-spec parts of runner * clean up displayed names * clean up variable name conflict * fix testing doc generation for frontend-shared * ignore auto-generated gql frontend-shared code * minor changes * add container for root header gql query * test new page name display * improve component names * finish component rename * add e2e health check for docs menu * cleanup * stop tracking generated folder * restore original route names * add page titles to route * wire up browser picker * a11y and styles for browser picker in header * switch back to real name of route * add alias for gql-components * implement Lachlan's feedback
107 lines
3.4 KiB
YAML
107 lines
3.4 KiB
YAML
# https://www.graphql-code-generator.com/docs/getting-started/index
|
|
|
|
documentFilters: &documentFilters
|
|
immutableTypes: true
|
|
useTypeImports: true
|
|
preResolveTypes: true
|
|
onlyOperationTypes: true
|
|
avoidOptionals: true
|
|
|
|
vueOperations: &vueOperations
|
|
schema: './packages/graphql/schemas/schema.graphql'
|
|
config:
|
|
<<: *documentFilters
|
|
plugins:
|
|
- add:
|
|
content: '/* eslint-disable */'
|
|
- 'typescript'
|
|
- 'typescript-operations'
|
|
- 'typed-document-node':
|
|
# Intentionally specified under typed-document-node rather than top level config,
|
|
# becuase we don't want it flattening the types for the operations
|
|
flattenGeneratedTypes: true
|
|
|
|
vueTesting: &vueTesting
|
|
schema: './packages/graphql/schemas/schema.graphql'
|
|
config:
|
|
<<: *documentFilters
|
|
plugins:
|
|
- add:
|
|
content: '/* eslint-disable */'
|
|
- 'typescript'
|
|
- 'typescript-operations':
|
|
# For modifying in mountFragment
|
|
immutableTypes: false
|
|
- 'typed-document-node'
|
|
|
|
overwrite: true
|
|
config:
|
|
enumsAsTypes: true
|
|
declarationKind: 'interface'
|
|
strictScalars: true
|
|
scalars:
|
|
Date: string
|
|
DateTime: string
|
|
JSON: any
|
|
generates:
|
|
###
|
|
# Generates types for us to infer the correct "source types" when we mock out on the frontend
|
|
# This ensures we have proper type checking when we're using cy.mountFragment in component tests
|
|
###
|
|
'./packages/frontend-shared/cypress/support/generated/test-graphql-types.gen.ts':
|
|
schema: 'packages/graphql/schemas/schema.graphql'
|
|
plugins:
|
|
- add:
|
|
content: '/* eslint-disable */'
|
|
- 'typescript':
|
|
nonOptionalTypename: true
|
|
- 'packages/frontend-shared/script/codegen-type-map.js'
|
|
|
|
'./packages/frontend-shared/cypress/support/generated/test-cloud-graphql-types.gen.ts':
|
|
schema: 'packages/graphql/schemas/cloud.graphql'
|
|
plugins:
|
|
- add:
|
|
content: '/* eslint-disable */'
|
|
- 'typescript':
|
|
nonOptionalTypename: true
|
|
- 'packages/frontend-shared/script/codegen-type-map.js'
|
|
|
|
'./packages/graphql/src/gen/cloud-source-types.gen.ts':
|
|
schema: 'packages/graphql/schemas/cloud.graphql'
|
|
plugins:
|
|
- add:
|
|
content: '/* eslint-disable */'
|
|
- 'typescript'
|
|
|
|
###
|
|
# All of the GraphQL Query/Mutation documents we import for use in the .vue
|
|
# files for useQuery / useMutation, as well as types associated with the fragments
|
|
###
|
|
'./packages/launchpad/src/generated/graphql.ts':
|
|
documents: './packages/launchpad/src/**/*.vue'
|
|
<<: *vueOperations
|
|
|
|
'./packages/app/src/generated/graphql.ts':
|
|
documents: './packages/app/src/**/*.vue'
|
|
<<: *vueOperations
|
|
|
|
'./packages/frontend-shared/src/generated/graphql.ts':
|
|
documents: './packages/frontend-shared/src/gql-components/**/*.vue'
|
|
<<: *vueOperations
|
|
###
|
|
# All GraphQL documents imported into the .spec.tsx files for component testing.
|
|
# Similar to generated/graphql.ts, except it doesn't include the flattening for the document nodes,
|
|
# so we can actually use the document in cy.mountFragment
|
|
###
|
|
'./packages/launchpad/src/generated/graphql-test.ts':
|
|
documents: './packages/launchpad/src/**/*.vue'
|
|
<<: *vueTesting
|
|
|
|
'./packages/app/src/generated/graphql-test.ts':
|
|
documents: './packages/app/src/**/*.vue'
|
|
<<: *vueTesting
|
|
|
|
'./packages/frontend-shared/src/generated/graphql-test.ts':
|
|
documents: './packages/frontend-shared/src/gql-components/**/*.vue'
|
|
<<: *vueTesting
|