Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outputs - return node_id #1156

Open
okrupa opened this issue Oct 31, 2023 · 1 comment
Open

Outputs - return node_id #1156

okrupa opened this issue Oct 31, 2023 · 1 comment

Comments

@okrupa
Copy link

okrupa commented Oct 31, 2023

Hi,
I try to use output from your action. It should return comment ID, but I get node_id. Is this correct? If so the repo description is misleading.

@marocchino
Copy link
Owner

marocchino commented Nov 2, 2023

I don't remember well, but I think I mainly implemented it that way using the graphql API.
Because of backward compatibility, it seems difficult to change the current ID to a node ID, but it seems possible to return the ID as a new database ID.
However, most functions can be implemented with node ID, so if possible, please first check whether the rest API you want to use does not exist in graphql.

https://docs.github.com/en/rest/overview/comparing-githubs-rest-api-and-graphql-api?apiVersion=2022-11-28
https://docs.github.com/en/graphql/guides/using-global-node-ids

GitHub Docs
Learn about GitHub's APIs to extend and customize your GitHub experience.
GitHub Docs
You can get global node IDs of objects via the REST API and use them in GraphQL operations.

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

No branches or pull requests

2 participants