-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add variable inlining to OperationBuilder (#1012)
#### 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.
- Loading branch information
Showing
4 changed files
with
109 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters