With GraphQL you are able to make query or mutation on object of the repository. When syncing with an external tool you may want to use the identifier of the other tool to create or connect object.
GraphQL provide 3 types of identifier :
Query can only be done on the Absolute Identifier shortly called "id" or the External Identifier shortly called "externalId". As the Temporary identifier is not physically stored it cannot be queried.
These 2 identifiers can be used to :
Query 1 | Result 1 |
|
|
Query 2 | Result 2 |
|
|
The default behavior is to let the system give an absolute identifier to an object. The identifier is unique to the whole database of HOPEX. If you create several objects, even with the same characteristics, the identifier will be unique each time.
Query | Result |
|
|
The only way to control the identifier is to use the External Identifier. When the object is created you can specify the value. This value is unique but limited to the MetaClass object you are creating. Moreover this external identifier is not invariant so you can modify it after the object was created.
CAUTION: the profile you use must be granted to right to read and write this MetaAttribute. This is not always the default right in standard HOPEX profile in V3 or V4.
Query | Result |
|
|
Should you want to update the External Identifier you need to first query the object with the Absolute Identifier.
Query | Result |
|
|
If you do several mutation in a row you can use this External Identifier as a mean to connect object together.
For Example: In the mutation below we do the follwing
Query | Result |
|
|
The temporary Identifier works as the external identifier. The only difference is that the value of this identifier will not be stored in the database.
Hi
Is it possible to do a mutation with identifier as HexIdAbs? We are for our interface to snow, the hexidabs as a identifier. This works perfect, because the generated website in hopex is also working with the hexid.
Thank you
Kind regards
Hello,
Current update don't support HexaIdAbs as Identifier
You can use updateMany that can take a filter to select the object to edit. In this filter you can filter the object on "hexaIdAs". As it is unique you will always update the object you want.
WARNING We have changed our authentication method to support single sign-on (SSO).
To learn how SSO will affect your access to the MEGA Community, please read the FAQ here