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

Is it possible to dynamically include graphql fields? #95

Open
patrickdevivo opened this issue Dec 8, 2021 · 1 comment
Open

Is it possible to dynamically include graphql fields? #95

patrickdevivo opened this issue Dec 8, 2021 · 1 comment
Labels

Comments

@patrickdevivo
Copy link

Hi all!

I'm wondering if it's possible to use this library in a way that "dynamically" sets what GraphQL fields are used in a query (in the actual request to the GitHub API).

By "dynamic" I mean a way of specifying at runtime what fields to include in a request. For my use case, I'd actually be more interested in excluding fields under certain conditions 😃 .

For context, I maintain this project, which uses this library to implement the GitHub tables. We often hit GitHub's GraphQL API rate limit - which I believe is related to the number of fields/connections we request.

We have the ability to know, in our SQL query, which columns (GraphQL fields) are actually needed/requested by the user, so if we could only send those in the request to the GitHub API, that would probably allow us to avoid hitting the rate limit as frequently.

Is this possible today?

@jmguzik
Copy link

jmguzik commented Dec 13, 2021

I think you look for something similar to this: #17 (comment)

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

No branches or pull requests

3 participants