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

Spec does not allow for parsing a fragment only query #7

Open
fbielejec opened this issue Nov 7, 2019 · 0 comments
Open

Spec does not allow for parsing a fragment only query #7

fbielejec opened this issue Nov 7, 2019 · 0 comments

Comments

@fbielejec
Copy link

Reads/ updates to cache often require using [fragments].(https://www.apollographql.com/docs/react/caching/cache-interaction/#readfragment). Currently the entry-point function does not allow for parsing only a fragment, this won;t conform to schema:

(graphql-query {:fragments [{:fragment/name :fragment/followFields
                                              :fragment/type :User
                                              :fragment/fields [:user/is-followed :user/followers-count]}]})

it is possible to still generate the gql fragment by passing a manually conformed map:

(fragment-str {:fragment/name :fragment/followFields
                       :fragment/type :User
                       :fragment/fields [[:graphql-query/field :user/is-followed] [:graphql-query/field :user/followers-count]]})

But it should be supported "natively".

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