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

feat: add variable inlining to OperationBuilder #1012

Merged
merged 1 commit into from
Aug 23, 2024
Merged

Conversation

obmarg
Copy link
Owner

@obmarg obmarg commented Aug 23, 2024

Why are we making this change?

Now that a49710 is merged it's quite easy to extract an InputLiteral from a QueryVariables struct by the name of the variable. This makes it very easy to add variable inlining as a first class feature, rather than recommending post-processing as in #1007.

What effects does this change have?

Adds a new build_with_variables_inlined function to OperationBuilder that is available when Variables implements QueryVariableLiterals. This will return an Operation with no variables entry and all the variables added into the query string as arguments.

I had wanted to do this as a setting inside the builder, but getting the types to work with that was tricky - so another build function seemed the best option.

@obmarg obmarg enabled auto-merge (squash) August 23, 2024 19:16
Copy link

netlify bot commented Aug 23, 2024

Deploy Preview for cynic-querygen-web canceled.

Name Link
🔨 Latest commit bc71a86
🔍 Latest deploy log https://app.netlify.com/sites/cynic-querygen-web/deploys/66c8e1520be55200085244f9

@obmarg obmarg mentioned this pull request Aug 23, 2024
5 tasks
@obmarg obmarg force-pushed the obmarg/ztmmzmuwolwr branch from 97b5ed5 to bc71a86 Compare August 23, 2024 19:21
@obmarg obmarg merged commit e62fd26 into main Aug 23, 2024
6 checks passed
@obmarg obmarg deleted the obmarg/ztmmzmuwolwr branch August 23, 2024 19:24
@cynic-releaser cynic-releaser bot mentioned this pull request Aug 23, 2024
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

Successfully merging this pull request may close these issues.

1 participant