Once again, your solution works perfectly, and the resulting query looks much cleaner than what I originally had. I'm intrigued by the way you created the post$ variable and I'll have to analyse it a bit.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Pages1 2
#2
Programming / Re: REST to GRAPHQL
February 26, 2025, 12:40:16 PM
Now I'm having trouble with a mutation that includes variables. This is the request:
{ "query": "mutation productVariantsBulkUpdate($variants: [ProductVariantsBulkInput!]!, $productId: ID!) { productVariantsBulkUpdate(variants: $variants, productId: $productId) { product { id } productVariants { id barcode } userErrors { code field message } } } { variants: [ { id: \"gid://shopify/ProductVariant/31174618611799\", \"barcode\": \"190496879522\" } ], \"productId\": \"gid://shopify/Product/4353068859479\" }" }
and this is what is received:
{"errors":[{"message":"syntax error, unexpected LBRACKET (\"[\") at [1, 264]","locations":[{"line":1,"column":264}]}]}
I've tried setting up the query by including the variables in the actual query, but got nowhere as well. It looks like pos'n 264 is the opening curly bracket for the variables section Is there a special way of adding the variables section?
{ "query": "mutation productVariantsBulkUpdate($variants: [ProductVariantsBulkInput!]!, $productId: ID!) { productVariantsBulkUpdate(variants: $variants, productId: $productId) { product { id } productVariants { id barcode } userErrors { code field message } } } { variants: [ { id: \"gid://shopify/ProductVariant/31174618611799\", \"barcode\": \"190496879522\" } ], \"productId\": \"gid://shopify/Product/4353068859479\" }" }
and this is what is received:
{"errors":[{"message":"syntax error, unexpected LBRACKET (\"[\") at [1, 264]","locations":[{"line":1,"column":264}]}]}
I've tried setting up the query by including the variables in the actual query, but got nowhere as well. It looks like pos'n 264 is the opening curly bracket for the variables section Is there a special way of adding the variables section?
#3
Programming / Re: REST to GRAPHQL
February 21, 2025, 04:43:43 PM
You've been a big help Loren. I appreciate all the tips and insights.
#4
Programming / Re: REST to GRAPHQL
February 21, 2025, 02:01:04 PM
Thanks Loren, that was the key. So, do I have to 'escape' quotes whenever I use them?
Strange that none of the examples I've seen had the quotes 'escaped'.
Strange that none of the examples I've seen had the quotes 'escaped'.
#5
Programming / Re: REST to GRAPHQL
February 21, 2025, 10:32:35 AM
I'm having a lot of trouble with the 'quantities' field in the InventoryItem section to work. For example, the following works fine:
{ "query": "query { inventoryItem(id:\"gid://shopify/InventoryItem/41450849599575\") { id inventoryLevels(first:2) { edges { node { id location { id name } } } } } }" }
However, if I insert the quantities logic:
{ "query": "query { inventoryItem(id:\"gid://shopify/InventoryItem/41450849599575\") { id inventoryLevels(first:2) { edges { node { id location { id name } quantities(names: ["available"]) { name quantity } } } } } }" }
The response from the query is 'Bad Request'.
I've taken this logic from numerous examples I've found, and I've no clue as to why it doesn't work.
Any ideas would be welcome.
{ "query": "query { inventoryItem(id:\"gid://shopify/InventoryItem/41450849599575\") { id inventoryLevels(first:2) { edges { node { id location { id name } } } } } }" }
However, if I insert the quantities logic:
{ "query": "query { inventoryItem(id:\"gid://shopify/InventoryItem/41450849599575\") { id inventoryLevels(first:2) { edges { node { id location { id name } quantities(names: ["available"]) { name quantity } } } } } }" }
The response from the query is 'Bad Request'.
I've taken this logic from numerous examples I've found, and I've no clue as to why it doesn't work.
Any ideas would be welcome.
#6
Programming / Re: REST to GRAPHQL
February 10, 2025, 12:08:28 AM
Thanks Loren, this will certainly help. I've got a couple of simple requests working, and now I'm working on a much more complicated request.
#7
Programming / Re: REST to GRAPHQL
February 06, 2025, 09:45:19 PM
I tried to set up a simple query to get the name and address of a customer, and I am getting nowhere. I can't figure out how to define the GraphQL query. Do you have an example GraphQL query you could share?
#8
Programming / Re: REST to GRAPHQL
February 06, 2025, 04:31:22 PM
Thanks Loren, I appreciate any assistance you can provide. I'm going to convert a few simple REST functions to GraphQL and see how it goes.
Do you still use the same *plus/web/request endpoints?
Do you still use the same *plus/web/request endpoints?
#9
Programming / REST to GRAPHQL
January 08, 2025, 04:07:06 PM
I have to convert a REST based API to GRAPHQL and I was wondering if anyone has any experience with this?
Does anyone have any experience working with GRAPHQL, ideally in a SHOPIFY environment?
Does anyone have any experience working with GRAPHQL, ideally in a SHOPIFY environment?
#10
Thin Client/WindX / Re: Windx on a MAC
July 31, 2023, 09:33:46 PM
What about the Macs with the Apple M chip? It seems like that is the direction they are going.
#11
Programming / Re: Linux User Help
March 20, 2023, 05:50:10 PM
Thanks Mike,
I'm using the Simple CS on port 4093 but I'm not exactly sure what I would do for the first option, so I'll try the second option and see how that works.
I'm using the Simple CS on port 4093 but I'm not exactly sure what I would do for the first option, so I'll try the second option and see how that works.
#12
Programming / Linux User Help
March 18, 2023, 06:15:39 PM
I have a customer running OpenSuse 42.1 and I haven't done much on the linux side for some time, so I could use a little help.
The current value of 'WHO' is root and first of all, where within PxPlus is that set, and second, is it advisable to leave it as root or can that be changed?
The current value of 'WHO' is root and first of all, where within PxPlus is that set, and second, is it advisable to leave it as root or can that be changed?
#13
Nomads / Re: Change colour of Titlebar
December 08, 2022, 09:55:55 PM
I ended up using a combination of 'rectangle' and 'text' and it worked perfectly.
#14
Nomads / Re: Change colour of Titlebar
December 08, 2022, 07:09:57 PM
I thought that might work as well, but it didn't
#15
Nomads / Change colour of Titlebar
December 08, 2022, 04:22:00 PM
Does anyone have any ideas on changing the colour of a Titlebar after it has already been displayed?
This is for a menu panel, and there are options to change theme colours etc. If they change the colour I can have the colour of the other controls changed automatically, but I'm not sure if this can be done on a Titlebar.
This is a resizable panel and if I manually change the size, the titlebar colour is changed. So, any way to simulate a panel size change?
This is for a menu panel, and there are options to change theme colours etc. If they change the colour I can have the colour of the other controls changed automatically, but I'm not sure if this can be done on a Titlebar.
This is a resizable panel and if I manually change the size, the titlebar colour is changed. So, any way to simulate a panel size change?
Pages1 2