Skip to content

NodeJS: use ID only when it makes sense - #4313

Merged
slumbering merged 9 commits into
dagger:mainfrom
dolanor:nodejs-remove-id-union
Jan 10, 2023
Merged

slumbering merged 9 commits into
dagger:mainfrom
dolanor:nodejs-remove-id-union

Conversation

@dolanor

@dolanor dolanor commented Jan 5, 2023

Copy link
Copy Markdown
Contributor

We use SDK objects as much as possible, except in obvious case (when getting an object from its ID, we need to pass the ID, not the object itself, otherwise there is no value).

There is some part in the GraphQL API that needs to be updated (some param are name id but we pass them the object directly, and it would be better if they were renamed something else: #4192

fixes: #4214

@dolanor dolanor changed the title Nodejs remove id union NodeJS: use ID only when it makes sense Jan 5, 2023
@dolanor
dolanor force-pushed the nodejs-remove-id-union branch 3 times, most recently from de0ba87 to 59eb91f Compare January 5, 2023 13:41
Comment thread sdk/nodejs/api/client.gen.ts Resolved
Comment thread sdk/nodejs/api/client.gen.ts Resolved
@dolanor dolanor self-assigned this Jan 5, 2023

@TomChv TomChv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @helderco comments, I also left a simple question.

… comment

This is not standard, but it makes the documentation visible directly
without having to go to the definition of the optional type

Signed-off-by: Tanguy ⧓ Herrmann <[email protected]>
(the local `yarn lint` didn't complain for this line break…)

Signed-off-by: Tanguy ⧓ Herrmann <[email protected]>
the SDK API schema unmarshalling needs post work to populate the
introspection.Field.ParentObject and makes the tests harder to setup.

Signed-off-by: Tanguy ⧓ Herrmann <[email protected]>
@dolanor
dolanor force-pushed the nodejs-remove-id-union branch from 59eb91f to b9aaafd Compare January 10, 2023 14:21
Comment thread sdk/nodejs/api/test/api.spec.ts Resolved
the object is no longer accepted here

Signed-off-by: Tanguy ⧓ Herrmann <[email protected]>
@dolanor
dolanor force-pushed the nodejs-remove-id-union branch from e7261b8 to 05f6e59 Compare January 10, 2023 15:33

@helderco helderco left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

@TomChv TomChv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@slumbering slumbering left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NodeJS: Convergence on hiding IDs

4 participants