Request

Response

    Mutations

    setModelAsPrimary

    mutation

    Sets the given model as the primary in its part number group.

    Template for Mutation:

    mutation SetModelAsPrimary($input: setModelAsPrimaryInput){
      setModelAsPrimary(input: $input) {
        # SetModelAsPrimaryPayload Fields
      }
    }
    

    Arguments

    inputInput object for updating the primary model.

    Possible Returns

    Value TypeDescription
    SetModelAsPrimaryPayload! non-null


    Examples

    Example 1

    Set the given model as the primary in its part number group.

    Query:

     mutation SetModelAsPrimary($input: SetModelAsPrimaryInput){
       setModelAsPrimary(input: $input) {
           model {
               id
               isPrimary
           }
       }
    }
    
    Show More

    Query Variables:

    {
     "input" : {
       "modelId":"bW9kZWx-OWFiTWNGeEtnaFB5Y3d1TW9hR05pa19MMkN-emExWlNFS1BuVEd4NWlvT24wdWdVQV9hZ2E"
     }
    }
    

    Response:

    {
       "data": {
           "setModelAsPrimary": {
               "model": {
                   "id": "bW9kZWx-OWFiTWNGeEtnaFB5Y3d1TW9hR05pa19MMkN-emExWlNFS1BuVEd4NWlvT24wdWdVQV9hZ2E",
                   "isPrimary": true
               }
           }
       }
    }
    
    Show More