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

Too many vectors in syntax #45

Open
isaksky opened this issue Aug 26, 2021 · 0 comments
Open

Too many vectors in syntax #45

isaksky opened this issue Aug 26, 2021 · 0 comments

Comments

@isaksky
Copy link

isaksky commented Aug 26, 2021

In order to generate this GraphQL query:

employees(first: 5, after: $cursor) {
    edges {
      node {
        dbId
        description
      }
    }
  }

Venia requires this syntax:

[
 [:employees {:first 5 :after :$cursor}
  [
   [:edges
    [
     [:node
      [:dbId :description]]]]]]]

Is there a good reason to require the extra vector before and after the [:edges line? Why not just treat all elements after the field name as a nested selection?

For example, in hiccup, syntax like this is supported: [:div {} [:p "test"]]. You don't need to wrap [:p "test"] in yet another vector.

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

1 participant