Select * for Github GraphQL Search

前端 未结 2 1319
暗喜
暗喜 2021-01-21 06:49

One of the advantage of Github Search v4 (GraphQL) over v3 is that it can selectively pick the fields that we want, instead of always getting them all. However, the problem I\'m

2条回答
  •  日久生厌
    2021-01-21 07:46

    Short Answer: No, by design.

    GraphQL was designed to have the client explicitly define the data required, leading to one of the primary benefits of GraphQL, which is preventing over fetching.

    Technically you can use GraphQL fragments somewhere in your application for every field type, but if you don't know which fields you are trying to get it wouldn't help you.

提交回复
热议问题