-
Notifications
You must be signed in to change notification settings - Fork 992
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
Refs #32685 - Keep modulized model name in Global ID #9458
Refs #32685 - Keep modulized model name in Global ID #9458
Conversation
Issues: #32685 |
I've merged #9449, go ahead with the rebase :) |
0044739
to
61b8812
Compare
rebased and all 🟢 |
This looks correct to me, but my GraphQL knowledge is really limited. @ofedoren mind having a second look here? |
Well, I've done something similar, but kidna hidden: 6b557cf Instead of explicitly call This PR just makes the same, but explicitly. I'm not against this fix, just not sure if it's actually needed. UPD: I can also be mistaken since my understanding of the library is also poor... |
I don't think it's the same. I just tested Global Id generation on the [1] pry(main)> Foreman::GlobalId.decode(Foreman::GlobalId.for(ForemanPuppet::Environment.find(5)))
=> [1, "Environment", "5"] As you can see, [1] pry(main)> Foreman::GlobalId.decode(Foreman::GlobalId.for(ForemanPuppet::Environment.find(5)))
=> [1, "ForemanPuppet_Environment", "5"] It's better, but still, I expected the type to be [1] pry(main)> Foreman::GlobalId.decode(Foreman::GlobalId.for(ForemanPuppet::Environment.find(5)))
=> [1, "ForemanPuppet::Environment", "5"] |
61b8812
to
f6f2504
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ofedoren is on PTO, but I'm going to trust your code changes.
This is to properly handle model names that are scoped by plugin name. Because the graphql type name can't contain
::
we could use_
insteadhowever, the Global ID should contain the correct model name, with
::
.