Skip to content

Probable GQL type name clash #3123

Open

Description

The code in generate.go looks like it will create a name clash if on an object we have two one-manys:

type foo {
  bar1: [NotNullBar]
  bar2: [Bar!]
}

Given that at the moment it is only possible have non-nillable scalar arrays, I think this is only exposed when naming objects after scalars (NotNull[ScalarName]), this may become a bigger problem if we ever change the type for one-manys to be an array of not-nulls (which it probably should be). For example:

type foo {
  bar1: [NotNullInt] # one-many
  bar2: [Int!] #scalar array 
}

Search for todo in code:

// todo: There's a potential to have a name clash
// https://github.com/sourcenetwork/defradb/issues/3123
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions