Skip to main content
Seasoned ⭐️⭐️⭐️
March 23, 2023
Solved

FDM- Unable to create Uniqueness constraint

  • March 23, 2023
  • 3 replies
  • 93 views

Hi Team, 

 

I am trying to use uniqueness constraint in model using Cognite UI - 

type EntityNew @container(indexes: [{identifier : "entityTypeIndex", fields : ["id"]}], constraints : [{identifier:"id",constraintType:UNIQUENESS,fields:["id"]}]){

  id: String!

  name: String!

  dept: Department

}

 

type Department{

  name: String

}


I am getting error - invalid: 400 Bad Request. Text: "{ "error": { "code": 400, "message": "Missing required field: constraintType" } }" I also tried using GraphQL API and facing same issue. Can you please help.

    Best answer by Snehal-Jagtap

    Thanks Jason!!

    3 replies

    Expert ⭐️⭐️⭐️⭐️
    March 23, 2023

    Snehal,
    A ticket has been created to address resolution of this issue.  We will update you once resolved.

    Regards,
    Jason

    Snehal-JagtapAuthorAnswer
    Seasoned ⭐️⭐️⭐️
    March 24, 2023

    Thanks Jason!!

    Expert ⭐️⭐️⭐️⭐️
    April 5, 2023

    This issue has been resolved.