Skip to content

Commit

Permalink
add changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
hayes committed Feb 23, 2023
1 parent 420e975 commit d2b02b7
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 7 deletions.
6 changes: 6 additions & 0 deletions .changeset/eight-ligers-develop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@pothos/plugin-relay': patch
'@pothos/deno': patch
---

Fix a few issues with globalID parsing
6 changes: 4 additions & 2 deletions packages/deno/packages/plugin-relay/index.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 12 additions & 2 deletions packages/deno/packages/plugin-relay/schema-builder.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/plugin-relay/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class PothosRelayPlugin<Types extends SchemaTypes> extends BasePlugin<Typ
const argMappings = mapInputFields(fieldConfig.args, this.buildCache, (inputField) => {
if (inputField.extensions?.isRelayGlobalID) {
return (inputField.extensions?.relayGlobalIDFor ??
inputField.extensions?.alwaysParse ??
inputField.extensions?.relayGlobalIDAlwaysParse ??
false) as boolean | { typename: string; parseId: (id: string, ctx: object) => unknown }[];
}

Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-relay/src/schema-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ schemaBuilderProto.nodeInterfaceRef = function nodeInterfaceRef() {
id: t.arg.globalID({
required: true,
extensions: {
alwaysParse: true,
relayGlobalIDAlwaysParse: true,
},
}),
},
Expand Down Expand Up @@ -206,7 +206,7 @@ schemaBuilderProto.nodeInterfaceRef = function nodeInterfaceRef() {
ids: t.arg.globalIDList({
required: true,
extensions: {
alwaysParse: true,
relayGlobalIDAlwaysParse: true,
},
}),
},
Expand Down

0 comments on commit d2b02b7

Please sign in to comment.