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

Allow direct use of client #28

Closed
BenoitRanque opened this issue Apr 14, 2020 · 1 comment
Closed

Allow direct use of client #28

BenoitRanque opened this issue Apr 14, 2020 · 1 comment
Labels
✨ enhancement New feature or request

Comments

@BenoitRanque
Copy link

Allowing the client to be provided to useQuery, useMutation, and useSubscription would allow the use of multiple clients in the same context, something not currently possible.

The api would look like this:

    const client = createClient({
      url: '/graphql' // your endpoint.
    });
    const { data } = useQuery({
      client,
      query: '{ todos { text } }'
    });
@logaretm logaretm added the ✨ enhancement New feature or request label Apr 14, 2020
@logaretm
Copy link
Owner

Available as of alpha releases here:

https://logaretm.github.io/villus/api/client/#using-the-client-manually

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants