- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 106
 
Open
Labels
EnhancementA new feature or improvement to Houdini's public APIA new feature or improvement to Houdini's public API
Description
Describe the bug
Currently, the (query name)Variables type, exported from ./$houdini, requires the return type to contain values for variables that are defined with runtime scalars, even though not defining them works.
For example, take the following query document, with FooScalar a runtime scalar:
query Example($a: FooScalar!, $b: String!, $c: Boolean) {
   foo, bar
}In a +page.ts file:
import { type ExampleVariables } from './$houdini';
//                                                        v~~ Missing property "a" in return type
export const _ExampleVariables: ExampleVariables = async () => ({ b: "spam", b: true })Workaround
We are currently hardcoding a list of runtime scalars (we juste have one for the moment), and re-defining the type using VariablesFunction:
...and using them accordingly:
I'll set up a repro link later if it's necessary.
Since runtime scalars are a gated feature, I guess this could be expected, but accomodating for this would lead to a better DX. I may have time to work up a PR sometime around the end of next week
Reproduction
No response
Metadata
Metadata
Assignees
Labels
EnhancementA new feature or improvement to Houdini's public APIA new feature or improvement to Houdini's public API