Read resources in a project using Resolvers logic
See original GitHub issueRight now we use resolvers to resolve context and owl:imports.
We could think about providing a mechanism to resolve any arbitrary resource for the fetch API.
Scenario
resource A (id1) --> org/project1 resource B (id2) --> org/project2
org/project2
has a cross project resolver pointing to org/project1
. So basically, through org/project2
we are able to see everything in project org/project1
.
Implementation
We should be able to retrieve id1 through project2 even though it belongs to project1. The regular fetch API should work: /v1/resources/org/project2/_/id1
Note that this should only work for reads. We shouldn’t be able to perform any other operation accessing a resource indirectly.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:10 (8 by maintainers)
Top Results From Across the Web
API (GraphQL) - Overwrite & customize resolvers - Amplify Docs
GraphQL resolvers connect the fields in a type's schema to a data source. Resolvers are the mechanism by which requests are fulfilled.
Read more >Introducing Direct Lambda Resolvers: AWS AppSync ...
Resolvers – provide business logic linking or “resolving” types/fields defined in the GraphQL schema with the data in the data sources. A ...
Read more >Custom data sources, resolvers, and resources with GraphQL ...
Write resolver logic that will be bundled and deployed as part of amplify push that target existing resources or resources that were provisioned ......
Read more >AEM Resource Resolver & Query Builder - YouTube
What is a resource resolver in AEM and how to use query builder API to query in the JCR and get the content...
Read more >Full Stack Error Handling with GraphQL and Apollo
networkError : Errors that are thrown outside of your resolvers. If networkError is present in your response, it means your entire query was ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We propose this endpoint for resolving resources using the resolution logic:
/v1/resolvers/{org}/{project}/_/{resourceId}
-> resolves the {resourceId} against all the resolvers in the project/v1/resolvers/{org}/{project}/{resolverId}/{resourceId}
-> resolves the {resourceId} against the selected resolver {resolverId} in the project/v1/resources/{org}/{project}/resolver/{resolverId}/{resourceId}
-> resolves the {resourceId} against the selected resolver {resolverId} in the project@genric and @MFSY are you fine with that?
@umbreak ok, in the time being we probably can do cross project query to get the id’s. But fetching by id, I think, should take into account only the available resolvers and no additional flags that you want to do cross project, otherwise we will set them all the time 😃. If you don’t want cross project => delete the resolver, at least this is my take on it now.