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:
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 startin thebefore-migration/reservationsdirectory and running the above query, the following is output, and the resolver gets the correctly typed input:When running
npm startin theafter-migration/reservationsdirectory and running the above query, the following is output, and the resolver receives an unparsed string as input: