Candy,
You should still be able to use the low-level HTTP classes in Genero. I have attached some code that does the equivalent of the call here
https://shopify.dev/tools/graphiql-storefront-api.
(I won't put the Access Token in clear text, if you run their demo in your browser and use Dev Tools you can find it amongst the headers sent, and add it to your fglprofile as shopify.storefront.access.token = "<access token goes here>")
I also have an example using
https://github.com/trevorblades/countries if you want something without an access token.
In general if you can see an example using curl then you should be able to make the same requests using our low-level HTTP classes.
Reuben
{code}
IMPORT com
IMPORT util
MAIN
DEFINE req com.HttpRequest
DEFINE resp com.HttpResponse
DEFINE q, r STRING
-- Type derived from use of proposeType
TYPE responseType RECORD
data RECORD
shop RECORD
name STRING
END RECORD
END RECORD
END RECORD
DEFINE response responseType
LET req = com.HttpRequest.Create('
https://graphql.myshopify.com/api/2021-01/graphql.json')
CALL req.setHeader("Content-Type", "application/json")
CALL req.setHeader("Accept", "application/json")
CALL req.setHeader("X-Shopify-Storefront-Access-Token", fgl_getresource("shopify.storefront.access.token"))
CALL req.setMethod("POST")
LET q = '{"query":"{shop {name}}"}'
CALL req.doTextRequest(q)
LET resp = req.getResponse()
DISPLAY resp.getStatusCode()
IF resp.getStatusCode() = 200 THEN
LET r = resp.getTextResponse()
DISPLAY r
--DISPLAY util.JSON.proposeType(r) -- Use this to determine record structure for j
CALL util.JSON.parse(r, response)
DISPLAY response.data.shop.name
END IF
END MAIN
{code}