{"id":24458628,"url":"https://github.com/blimmer/graphql-jit-issue","last_synced_at":"2025-09-22T22:25:21.100Z","repository":{"id":272803597,"uuid":"917808676","full_name":"blimmer/graphql-jit-issue","owner":"blimmer","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-16T17:30:02.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-16T18:49:23.714Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blimmer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-16T17:25:56.000Z","updated_at":"2025-01-16T17:30:04.000Z","dependencies_parsed_at":"2025-01-16T18:59:37.910Z","dependency_job_id":null,"html_url":"https://github.com/blimmer/graphql-jit-issue","commit_stats":null,"previous_names":["blimmer/graphql-jit-issue"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blimmer%2Fgraphql-jit-issue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blimmer%2Fgraphql-jit-issue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blimmer%2Fgraphql-jit-issue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blimmer%2Fgraphql-jit-issue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blimmer","download_url":"https://codeload.github.com/blimmer/graphql-jit-issue/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243551234,"owners_count":20309290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-21T03:15:20.575Z","updated_at":"2025-09-22T22:25:16.056Z","avatar_url":"https://github.com/blimmer.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# graphql-jit-issue\n\nThis PR shows an issue with `@envelop/graphql-jit` where it doesn't work with `Temporal.PlainDate`.\n\nWhen `jit` is enabled, the `input.date` argument is not a `Temporal.PlainDate` but a `string`. When `jit` is disabled,\nthe `input.date` argument is a `Temporal.PlainDate`.\n\n## How to run\n\n```bash\ngit clone https://github.com/blimmer/graphql-jit-issue.git\ncd graphql-jit-issue\nyarn\nyarn start\n```\n\nOpen http://localhost:4000/graphql and try to run the `testMutation` mutation.\n\n```graphql\nmutation {\n  testMutation(input: { date: \"2018-01-01\" }) {\n    date\n  }\n}\n```\n\nWhen `jit` is enabled, the `input.date` argument is a `string` and the mutation fails.\n\n```shell\nERR Error: Input should be a Temporal.PlainDate\n    at Object.testMutation (/Users/blimmer/code/graphql-jit-issue/src/server.ts:36:17)\n    at Array.testMutationMutationtestMutationResolverMutation (eval at compileQuery (/Users/blimmer/code/graphql-jit-issue/node_modules/graphql-jit/dist/execution.js:120:9), \u003canonymous\u003e:116:39)\n    at query (eval at compileQuery (/Users/blimmer/code/graphql-jit-issue/node_modules/graphql-jit/dist/execution.js:120:9), \u003canonymous\u003e:46:25)\n    at query (/Users/blimmer/code/graphql-jit-issue/node_modules/graphql-jit/src/execution.ts:389:27)\n    at ValueOrPromise.then.result.stringify (file:///Users/blimmer/code/graphql-jit-issue/node_modules/@envelop/graphql-jit/esm/index.js:46:41)\n    at new ValueOrPromise (/Users/blimmer/code/graphql-jit-issue/node_modules/value-or-promise/src/ValueOrPromise.ts:35:15)\n    at jitExecutor (file:///Users/blimmer/code/graphql-jit-issue/node_modules/@envelop/graphql-jit/esm/index.js:46:16)\n    at file:///Users/blimmer/code/graphql-jit-issue/node_modules/@envelop/core/esm/utils.js:83:61\n    at file:///Users/blimmer/code/graphql-jit-issue/node_modules/@envelop/core/esm/orchestrator.js:386:33\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {\n  locations: [ { line: 1, column: 10 } ],\n  path: [ 'testMutation' ]\n}\n```\n\nWhen `jit` is disabled, the `input.date` argument is a `Temporal.PlainDate` and the mutation succeeds. Comment out\nthe `useGraphQlJit()` plugin to see the resolver working properly.\n\n```json\n{\n  \"data\": {\n    \"testMutation\": {\n      \"date\": \"2018-01-01\"\n    }\n  }\n}\n```\n\n## Passing as a Variable\n\nIf you pass the date as a variable, it works even with `jit` enabled.\n\n```graphql\nmutation testMutation($input: TestMutationInput!) {\n  testMutation(input: $input) {\n    date\n  }\n}\n```\n\n```json\n{\n  \"input\": {\n    \"date\": \"2018-01-01\"\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblimmer%2Fgraphql-jit-issue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblimmer%2Fgraphql-jit-issue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblimmer%2Fgraphql-jit-issue/lists"}