Skip to content

[Bug]: mutation must have unique named fields from objectbrick #894

Open
@LeonNoBears

Description

@LeonNoBears

Expected behavior

Mutation is possible by calling the fields by either only their code e.g. foo or with the objec obrick as a prefix e.g. ObjectBrickFoo.foo

Actual behavior

gives an error because the label is picked and set in the scema.

Steps to reproduce

  1. Create a Class (MyClass)
  2. Create a object brick (ObjectBrickFoo), with a datatype table (code: foo, label: table)
  3. Create another object brick (ObjectBrickBar), with a datatype table (code: bar, label: table)
  4. link both the object bricks to the class.
  5. open mutation schema and setup the fields of the class (ObjectBrickFoo.foo and ObjectBrickBar.bar)
  6. fire a mutation and recieve error:
{
  "errors": [
    {
      "message": "Schema must contain unique named types but contains multiple types named \"TableInput\" (see [Introduction - graphql-php](https://webonyx.github.io/graphql-php/type-definitions/#type-registry).) "
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions