BA
setContextиз
apollo-link-context
. Принимает operation и previousContext, тип previousContext указан как any, тут ожидается, что мы подставим свой тип контекста?
Size: a a a
BA
setContextиз
apollo-link-context
C
O
C
R
O
C
EA
O
C
C
schema: 'https://api.dev.suworld.ru/graphql'
documents:
- 'src/**/*.graphql'
generates:
schema.graphql:
plugins:
- schema-ast
src/__generated__/types.ts:
plugins:
- typescript
./:
preset: near-operation-file
presetConfig:
folder: __generated__
extension: .tsx
baseTypesPath: 'src/__generated__/types.ts'
plugins:
- typescript-operations
- typescript-react-apollo
config:
documentMode: 'documentNodeImportFragments'
namingConvention: keep
nonOptionalTypename: true
dedupeOperationSuffix: true
omitOperationSuffix: true
withComponent: false
withHooks: true
withHOC: false
reactApolloVersion: 3
C
O
C
AD
АГ
a
useQuery,
у второго в параметре skip
будет условие, которое тебе нужно. useQuery + lazyQuery
. Второй запрос пускать по условию ,в какой нибудь ифочке/useEffect’еO