Skip to content

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

@fbielejec

Description

@fbielejec

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".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions