Skip to content

Provide unique index support for GraphQL+- #5512

@sessionboy

Description

@sessionboy

What you wanted to do

I am using GraphQL +-.

I want to achieve a unique index at the database level. I know that GraphQL is planning to support it, but I hope that GraphQL +- will also support it.

I know that the uniqueness can be verified before inserting the record, but I ca n’t guarantee misoperation or someone else inserts the record without verifying the uniqueness. Once this happens it will be extremely bad.

I think like other databases, it is very necessary to achieve uniqueness at the database level。

Like this:

name: string @index(exact) @unique .
username: string @index(exact) @unique .
email: string @unique  .
phone_number: string @unique .
...

I only need to add a @unique so I don’t need to worry about it anymore, and I can save a lot of extra work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/indexesRelated to indexes (indices) and their usage.area/querylangIssues related to the query language specification and implementation.kind/featureSomething completely new we should consider.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions