Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

atomsWithQuery optional 2nd parameter isn't optional #8

Open
wcardosodev opened this issue Apr 26, 2023 · 0 comments
Open

atomsWithQuery optional 2nd parameter isn't optional #8

wcardosodev opened this issue Apr 26, 2023 · 0 comments

Comments

@wcardosodev
Copy link

Hey, I've tried following the code example shown in the readme but using my own api and queries etc. In the example of atomsWithQuery it says that the: () => client parameter is optional, however removing that parameter causes app to crash and gives this error:
Uncaught ApolloError: Response not successful: Received status code 404

From the docs it looks like the second parameter gets a default client like:
getClient: (get: Getter) => ApolloClient<any> = (get) => get(clientAtom)

But I can't see an example of how to set it up so that the default clientAtom has our graphql client

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant