graphql/graphiql

Wrap auto-completed list input values with square brackets if required

オープン

#587 opened on 2017/09/02

 (11 件のコメント) (8 件のリアクション) (0 人の担当者)TypeScript (1,785 件のフォーク)batch import
buggood first issuegraphql-language-service

Repository metrics

Stars
 (15,473 個のスター)
PR merge metrics
 (PR metrics pending)

説明

In Gatsby's connections, you can add a sort input like the following:

allMarkdownRemark(sort: { fields: [frontmatter___title], order: DESC}) {
  edges {
    node {
      id
    }
  }
}

But in graphiql, it doesn't enforce that fields must be an array so people regularly complain sorting is broken as they just add a field in the UI and then when they try to copy that into a project it won't work.

Is there a reason graphiql is like this? It seems to be casting the single values to an array which is why it seems to work.

コントリビューターガイド