sangria-graphql/sangria

BLOCKING BUG: enum in case class fails with "Argument 'xyz' has invalid value: CNil"

オープン

#528 opened on 2020/11/04

 (4 件のコメント) (0 件のリアクション) (0 人の担当者)Scala (219 件のフォーク)batch import
help wanted

Repository metrics

Stars
 (1,961 個のスター)
PR merge metrics
 (平均マージ 8d 15h) (30d で 4 merged PRs)

説明

I have a case class which contains an enum for which I use EnumType()and deriveInputObjectType[] to create the schema.

Sangria shows an Argument 'testEnum' has invalid value: CNil when I send something like:

MethodCall(testCaseClass: {
    name: "just a name",
    testEnum: FIRST
  }) {
    result
  }

If I use testEnum as a parameter of a mutation directly, everything works fine. It seems that this problem only appears when an enum is used as part of a case class.

I am using Sangria 2.0.1, Circe 0.13.0 and Sangria-Circe 1.3.1

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