You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I thought the solution would be to import like this: import Apollo from '@apollo/client';
instead of the current: import * as Apollo from '@apollo/client';
but it doesn't seem to work either ('@apollo/client/index has no default export')
Failing test / Solution:
I've looked into this, but I don't know how to solve this
Unrelated issue:
I couldn't use the CodeSandbox link to create a reproduciton repo:
The text was updated successfully, but these errors were encountered:
Which packages are impacted by your issue?
@graphql-codegen/typescript-react-apollo
Describe the bug
Issue
TypeError: __vite_ssr_import_[importNb]__.useQuery is not a function
Your Example Website or App
https://stackblitz.com/edit/github-kocgurap-ascqncjf
Steps to Reproduce the Bug or Issue
Expected behavior
The
npx create-react-router@latest
app should run.Screenshots or Videos
Platform
graphql
version:"graphql": "^16.10.0",
"graphql-tag": "^2.12.6",
@graphql-codegen/*
version(s):"@graphql-codegen/cli": "^5.0.4",
"@graphql-codegen/near-operation-file-preset": "^3.0.0",
"@graphql-codegen/typescript": "^4.1.3",
"@graphql-codegen/typescript-operations": "^4.4.1",
"@graphql-codegen/typescript-react-apollo": "^4.3.2",
Codegen Config File
import { CodegenConfig } from '@graphql-codegen/cli';
const config: CodegenConfig = {
schema: 'schema.graphql',
documents: 'document.graphql',
config: {
gqlImport: 'graphql-tag#gql',
},
generates: {
'types.ts': {
plugins: [
'typescript',
'typescript-operations',
'typescript-react-apollo',
],
},
},
};
export default config;
Additional context
I thought the solution would be to import like this:
import Apollo from '@apollo/client';
instead of the current:
import * as Apollo from '@apollo/client';
but it doesn't seem to work either ('@apollo/client/index has no default export')
Failing test / Solution:
I've looked into this, but I don't know how to solve this
Unrelated issue:
I couldn't use the CodeSandbox link to create a reproduciton repo:
The text was updated successfully, but these errors were encountered: