Skip to content

[Federation] Schema built with buildFederatedSchema does not run custom scalar parseLiteral #2832

@hannesj

Description

@hannesj

It seems custom scalars' parseLiteral is not run, when using them as inputs in a schema where federation is enabled.

I created a small repro in https://github.com/hannesj/federation-migration-example.

You can see the issue by running the server and sending the following query:

{ reservation(id: "UmVzZXJ2YXRpb24=:MQ==") { id } }

When running npm start in the before-migration/reservations directory and running the above query, the following is output, and the resolver gets the correctly typed input:

{
  kind: 'StringValue',
  value: 'UmVzZXJ2YXRpb24=:MQ==',
  block: false,
  loc: { start: 20, end: 43 }
}
TypedID { type: 'Reservation', id: '1' }

When running npm start in the after-migration/reservations directory and running the above query, the following is output, and the resolver receives an unparsed string as input:

UmVzZXJ2YXRpb24=:MQ==

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions