Skip to content

Commit

Permalink
tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
AlecAivazis committed Mar 11, 2024
1 parent 5e45e6c commit e93efce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions packages/houdini/src/lib/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,8 @@ export function operation_requires_variables(operation: graphql.OperationDefinit
export function unwrapType(
config: Config,
type: any,
wrappers: TypeWrapper[] = []
wrappers: TypeWrapper[] = [],
convertRuntimeScalars?: boolean
): { type: graphql.GraphQLNamedType; wrappers: TypeWrapper[] } {
// if we are looking at a non null type
if (type.kind === 'NonNullType') {
Expand All @@ -314,7 +315,7 @@ export function unwrapType(
}

// if we got this far and the type is a runtime scalar, we need to use the underlying type
if (config.configFile.features?.runtimeScalars?.[type.name.value]) {
if (convertRuntimeScalars && config.configFile.features?.runtimeScalars?.[type.name.value]) {
type = config.schema.getType(
config.configFile.features?.runtimeScalars?.[type.name.value].type
)
Expand Down
2 changes: 1 addition & 1 deletion packages/houdini/src/lib/router/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ async function add_query(args: {
// add this queries variables to the bag
const queryVariables = Object.fromEntries(
query.variableDefinitions?.map((variable) => {
const { type, wrappers } = unwrapType(args.config, variable.type)
const { type, wrappers } = unwrapType(args.config, variable.type, [], true)
return [
variable.variable.name.value,
{ wrappers: wrappers as string[], type: type.name },
Expand Down

0 comments on commit e93efce

Please sign in to comment.