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

Extended dynamic input queries #84

Open
wilkerlucio opened this issue Aug 3, 2021 · 0 comments
Open

Extended dynamic input queries #84

wilkerlucio opened this issue Aug 3, 2021 · 0 comments
Assignees

Comments

@wilkerlucio
Copy link
Owner

Allow a user query to extend a nested input from a resolver.

In the following example scenario:

(pco/defresolver all-people3 [{:swapi.Root/keys [allPeople]}]
  {::pco/input
   [{:swapi.Root/allPeople
     [{:swapi.PeopleConnection/people
       [:swapi.types/Person]}]}]

   ::pco/output
   [{:swapi/all-people
     [:swapi.types/Person]}]}
  {:swapi/all-people
   (get allPeople :swapi.PeopleConnection/people)})

With that setup, that re-shapes data from a dynamic source, a user query like:

[{:swapi/all-people
  [:swapi.Person/name]}]

Should extend the sub-query at :swapi.PeopleConnection/people.

One point to consider is that a query input/output may have multiple nested points, and how to move from where to where needs to be defined somehow.

My first idea would be to add some parameters to mark the compatible extensions.

This needs more thought.

@wilkerlucio wilkerlucio added the enhancement New feature or request label Aug 3, 2021
@wilkerlucio wilkerlucio self-assigned this Jan 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant