graphql-go / graphql-go/graphql
Objects with same name
- Dominant language
- Go
- Stars
- 10.1k
- Forks
- 845
- PR merge metrics
- No merged PRs in 30d
Description
If a have two objects or InputObject with same `Name`, GraphQL return the error: **Unknown type "String"** or something like this.
Ex: Two objects with name `timeType`
```
var timeInputType = graphql.NewInputObject(graphql.InputObjectConfig{
Name: "timeType",
Fields: graphql.InputObjectConfigFieldMap{
"value": &graphql.InputObjectFieldConfig{
Type: graphql.Int,
},
"time": &graphql.InputObjectFieldConfig{
Type: graphql.Int,
},
},
})
```
```
var timeType = graphql.NewObject(graphql.ObjectConfig{
Name: "timeType",
Fields: graphql.Fields{
"value": &graphql.Field{
Type: graphql.Int,
},
"time": &graphql.Field{
Type: graphql.Int,
},
},
})
```
There is a easy way to debug this error?
Contributor guide
Assessment
This issue has not been assessed yet.