Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

bundling useQuery with rollup #3799

Closed
gilesbradshaw opened this issue Jan 15, 2020 · 1 comment
Closed

bundling useQuery with rollup #3799

gilesbradshaw opened this issue Jan 15, 2020 · 1 comment

Comments

@gilesbradshaw
Copy link
Contributor

I'm trying to create a package that exports functionality using useQuery

However I get the following error:

Could not find "client" in the context or passed in as an option. Wrap the root component in an <ApolloProvider>, or pass an ApolloClient instance in via options.

This is even with simplest possible example which just exports useQuery (obvs real code does more than this)

I know my code is ok otherwise as if I import useQuery using

import { useQuery } from '@apollo/react-hooks'

it works fine

simple example is here..

https://github.com/gilesbradshaw/use-query

@gilesbradshaw
Copy link
Contributor Author

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

No branches or pull requests

1 participant