I’m working with a few different GraphQL endpoints where are becoming much more common it seems in B2B applicaitons.
While GraphQL still uses just REST, formatting payloads in Arc is a bit difficult other than just using plain text and script port:
For example:
https://shopify.dev/docs/api/admin-graphql/unstable/queries/order?language=cURL
GraphQL looks like:
query {
node(id: "gid://shopify/Order/148977776") {
id
... on Order {
name
}
}
}
but to support this in Arc, I need to use a script port with a string of:
{"query": "query { node(id: "gid://shopify/Order/148977776") { id ... on Order { name } } }
Which fair enough is simple for my example, but realistic GraphQL queries are much more complex. Any suggestions on how to potentially work with this format in Arc?
Best answer by James B
View original