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

Enforce route variable function if there are non-null arguments #242

Closed
AlecAivazis opened this issue Mar 25, 2022 · 2 comments · Fixed by #449
Closed

Enforce route variable function if there are non-null arguments #242

AlecAivazis opened this issue Mar 25, 2022 · 2 comments · Fixed by #449
Labels
Enhancement A new feature or improvement to Houdini's public API

Comments

@AlecAivazis
Copy link
Collaborator

A query like the following should not require a variable function

query AboutQuery($first: Int, $after: String, $last: Int, $before: String { 
   ...
}
@fehnomenal
Copy link
Contributor

Probably also when the query has only default arguments (nullable or not).

@AlecAivazis AlecAivazis added the Bug Something isn't working like it should label Jun 24, 2022
@AlecAivazis AlecAivazis changed the title Only enforce route variable function if there are non-null arguments Enforce route variable function if there are non-null arguments Jul 5, 2022
@AlecAivazis
Copy link
Collaborator Author

I'm removing the bug tag since this no longer errors. The preprocessor now looks for the variable functions existence before generating a reference to it. While it did cover the original scenario, we did lose a "fast fail" since the user has to look at the network response to see why the error failed.

We now need a check that a variable function exists if the query has non-nullable inputs

@AlecAivazis AlecAivazis added Enhancement A new feature or improvement to Houdini's public API and removed Bug Something isn't working like it should labels Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement A new feature or improvement to Houdini's public API
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants