graphql-go / graphql-go/graphql

Update Schema

Open
#516 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
10.1k
Forks
845
PR merge metrics
No merged PRs in 30d

Description

Hello,
First thanks for this great project.
I ran into the issue when updating a schema.
For an update, I first remove the type then add the new one
```
delete(schema.TypeMap(), resourceType.Name())
schema.AppendType(resourceType)
```
It works when the schema doe not contain a field of type object.
But when using an object, it seems that updates have a collision name, as it returns the error:
> Schema must contain unique named types but contains multiple types named "objectA".
See code sample:
https://play.golang.org/p/N8iBmXzG-U1

Kind regards,

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.