Skip to content

Support multiple unique fields in dgraph GraphQL #5232

@sessionboy

Description

@sessionboy

What you wanted to do

Expect team to provide support for multiple unique fields in dgraph GraphQL, this is a very common requirement, like this:

 type User {
    id: ID!
    name: String! @unique
    username: String! @unique
    phone_number: String! @unique
    email: String @unique
    ...
 }

The unique field is allowed to be empty, and no verification is performed when the value of the unique field is empty. For example email above.

Any external references to support your case

prisma provides a great implementation for this, which can be used as a reference.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/graphqlIssues related to GraphQL support on Dgraph.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions