JDBC Driver for GraphQL

Build 22.0.8462

Using Mutations

The driver will automatically scan for available mutations. Given that there is no method provided by GraphQL for determining which mutations can be used for each table, each mutation is exposed as a stored procedure.

All SCALAR mutation fields are exposed directly, and all object fields are expanded.

LIST fields are exposed as temporary tables (GraphQL tables of type TEMPORARY_TABLE). The discovered temporary tables can be obtained by querying the sys_tables and sys_tablecolumns system tables. These tables contain a RowId and ParentId field to denote the row and housing (parent) table of a given child table.

An example of a mutation is productCreate. Invoke mutations as a stored procedure after first loading the relevant child tables needed for the operation:

INSERT INTO productCreate_metafields(namespace,key,value,type) VALUES('MRproductInfo','ALU','449788022','string')

INSERT INTO productCreate_variants(RowId,price,sku,inventoryManagement,weightUnit,weight,options,metafields,inventoryQuantities) VALUES(1,'39.99','38536314-0acb-4d3f-b8ff-a0f2014d2c75','SHOPIFY','POUNDS',1,'L,XL,XXL','productCreate_variants_metafields','productCreate_variants_inventoryQuantities')

INSERT INTO productCreate_variants_metafields(ParentId,namespace,key,value,type) VALUES('1','MRproductInfo','ALU','449788022-M-','string')

INSERT INTO productCreate_variants_metafields(ParentId,namespace,key,value,type) VALUES('1','MRproductInfo','ItemNumber','400000881201','string')

INSERT INTO productCreate_variants_inventoryQuantities(ParentId,locationId,availableQuantity) VALUES('1','gid://shopify/Location/1448280087',5)

INSERT INTO productCreate_media(originalSource,alt,mediaContentType) VALUES('https://static.nike.com/a/images/t_PDP_1280_v1/f_auto,q_auto:eco/qwqfyddzikcgc4ozwigp/revolution-5-road-running-shoes-szF7CS.png','Magic Shoes','IMAGE')

EXECUTE productCreate title='NIKE  - 449788022', descriptionHtml=' - MEN\\'S SHOES  42-MENS L/S TEES',productType='Staging', vendor='NIKE', published='false', options='size,width',metafields='productCreate_metafields', variants='productCreate_variants', media='productCreate_media'

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462