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

This is a really nice plugin - would love support with SWR #11

Open
followbl opened this issue Jul 14, 2020 · 1 comment
Open

This is a really nice plugin - would love support with SWR #11

followbl opened this issue Jul 14, 2020 · 1 comment
Labels
Feature New feature request

Comments

@followbl
Copy link

Admittedly Lazily I have not tried it out yet - but our queries do look ugly on the front-end ending up looking like this...I would love to have them cleaned up and get rid of the ugly loc.source.body access to the query string line everywhere.

  const query = {
    query: getCompanyByMatchQuery.loc.source.body,
    variables: {
      where: {
        company_users: {
          user_id: {
            _eq: currentUser.id,
          },
        },
      },
    },
  };

  const { data, error } = useSWR(JSON.stringify(query), () => fetcher(query));
@vilvaathibanpb
Copy link
Contributor

Hello @followbl ,
Thanks for the suggestion. That's a brilliant idea for the library. Feel free to work on it if you want to and we could do all support. Else give us some time. Currently, we are working on making the library as babel plugin to add it in build-time and not runt-time. We could pick this up after that :)

@vilvaathibanpb vilvaathibanpb added the Feature New feature request label Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature request
Projects
None yet
Development

No branches or pull requests

2 participants