Skip to content

Remove/replace isResourceClass #3420

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

Merged
merged 3 commits into from
May 8, 2025
Merged

Remove/replace isResourceClass #3420

merged 3 commits into from
May 8, 2025

Conversation

CarsonF
Copy link
Member

@CarsonF CarsonF commented May 8, 2025

With Props/SecuredProps on the chopping block, we don't really a have a way at runtime to check if a class is a resource.

But really what is a "resource"? It has some kind of alignment with GQL's Resource interface, but it is kinda fuzzy. It really could be any class model at this point. I think this is ok. We need to facilitate some inner workings that we don't want exposed to the GraphQL schema. Models need to be registered for dynamic lookup, be used in policies, but maybe there are situations we don't want to officially declare them, with @RegisterResource.
Some current examples are Pinnable, ChangesetAware.

I'm not sure. I'm not sure I believe the above. Fuzziness just leads to confusion.

The alternative to this, is to just check if the resource has been registered, and force that for consistency.
Maybe that's the next step.

This at least moves us away from depending on the Props array.

Aside: 80a9510 is in that other PR, but it contributes to this notion here.

CarsonF added 3 commits May 8, 2025 16:06
Now I've encoded the expectations more directly.
That it is a GQL interface & to avoid the intermediate intersected classes.
With the `Props` list no longer being a requirement,
the only runtime requirement we have is the value having a `prototype`.
Base automatically changed from refactor/db-labels to develop May 8, 2025 21:32
@CarsonF CarsonF merged commit 9dae7f1 into develop May 8, 2025
15 checks passed
@CarsonF CarsonF deleted the no-resources-check branch May 8, 2025 22:39
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.

1 participant