We integrated a Postgraphile mutation plugin using the method makeExtendSchemaPlugin.
Within our plugin, we utilize the NodeId
and parse it using the method getTypeAndIdentifiersFromNodeId
. This function returns the GraphQL Type
and a collection of Identifiers
.
If our type only has a single PrimaryKey
column, we encounter no issues. We simply use the first element from the Identifiers
collection to generate our SQL script smoothly.
However, if we have a composite PrimaryKey
, the Identifiers
collection contains multiple elements as expected.
- What is the order of elements in the
Identifiers
collection? - Is there a proper way to determine the correct order (or names) of the
Identifiers
elements for generating the correct SQL query?
Any help or suggestions would be greatly appreciated.