GQL updateOrderState?

All GQL syntax is accessable with the documentation interface GraphiQL as shown in the tutorial.

You mean using the Query tool in the browser?
In this situation I’m only using the API via script.

I spent at least 30 minutes searching the forum but didn’t find a reference to that mutation just yet.

Yes the query tool shows all available syntax that tool is the documentation.

Because it never existed. You really should enable the query tool if doing any GQL the forum has almost no documentation simply because it never needed too. It would take less than 30 seconds to enable the tool for your reference.

1 Like

With the new GQL authentication protocol, just getting authenticated with the server is quite a time consuming endeavor! I just want to know that syntax, if it exists at all that is.

It might be worth considering those people who are evaluating the platform, or the GQL API specifically, with the view to assess what functions they could use or not according their needs.

Having a list of GQL functions and syntax would be very useful in many situations where setting up the server, application defs, user access tokens, etc. is a rather excessive workload to just find out whether or not a function exists to do a job.

There is a list and it’s self documenting with the tool. There is no reason to keep a list on forum any changes to Gql would require manual upkeep on forum when the tool would automatically update. I’ve set it up multiple times and it’s not time consuming at all.

1 Like

When you set up authentication with GQL server, what are you using to insert the page request header fields required for the Token request, etc?

My guess is you’re using a web page app (perhaps PMPOS?) you already have configured and working.

For some insight into what it is like for a new user to set up GQL and authenticate, i suggest you set up a test scenario with a tech savvy person (someone who doesn’t yet have experience setting this up already), and watch them go through the process step by step, reading the tutorials, etc. That will show you a realistic setup time for a normal newbie situation.

Could you please do me a favor? and just let me know if there is an updateOrderState mutation there or not?

To setup the tool you don’t need to do anything but enable message server and the app then connect to localhost:9000 as the tutorial explains message server contains a light weight web server that handles it.

1 Like

You missed where I said it’s never existed? Gql is not meant for beginners or novices. I was a novice when he introduced it but I’m tech savvy and it was not hard.

Just use the tool it will help you out when you need more syntax. The forum won’t be much help for that unless you expect forum members to use the tool for you then relay back to you but that wouldn’t be very fast or efficient for you.

I thought you meant the post about it never existed, lol. I was sure i had read about it somewhere before!

Anyway, it seems you need a token to play with GQL syntax …

There is not.

So now your next question will be: “How do I update an Order State with GQL?”


Less than 1 minute to do this (30 seconds) …

Set up graphiql Application

Be sure the Application Identifier is EXACTLY: graphiql

NOTE: there is an i in that ^ Identifier, and it is all lowercase.


Set up graphiql USER

Be sure the User Name is EXACTLY: graphiql

NOTE: there is an i in that ^ User Name, and it is all lowercase.


Use Browser to Login to Interface

http://localhost:9000/login/

  • Be sure the port is correct for your message server
  • Be sure the /login/ path is part of the URL
  • Enter User Name: graphiql
  • Enter Password: graphiql
  • Click Go
  • if nothing appears to happen, then the Login was SUCCESSFUL.
  • if Login fails, a message appears “Try Again”

image


Use Browser to search GQL Queries and Mutations

http://localhost:9000/

  • Be sure the port is correct for your message server
  • Be sure the /login/ path is NOT part of the URL
  • the Interface should appear without any message like “Authorization has been denied for this request.”
  • use the Docs link in the top-left to browse or search
  • use the LEFT panel to type and execute queries/mutations - it even has intellisense and auto-complete

1 Like

Maybe i’m doing something really stupid. but i did all that. Created app config with All on Local Network rights, special user PIN and password, tried logging in with that user but get no response. Not even an error back on Login page.

I will work on this this another day. For now i’ll continue to use my existing Order State Update method as i’m deep in some other devolopment right now hence the desire not go off on this tangent. The reason for wanting that non-existant mutation is that i am getting some weird behaviour on Select Orders action when logging into windows with a restricted account. (client RDP session)

I had better report that issue in another thread. Thanks for your help so far!

Lack of response on the /login/ page is a good thing.

When you do a Login by clicking “Go”, there is no response whatsoever if the login was SUCCESSFUL. Nothing appears to happen at all.

You will only get a message of “Try Again” if the login was NOT successful.

Once the login is performed and is successful (ie. no messages), then you need to navigate to the GraphiQL interface without the /login/ in the path.

1 Like

Odd I can’t see how a windows user/account would have anything at all to do with Select Orders. I would be interested to hear more about this.

ok. That’s funny. I was logged in but didn’t know it!
A response such as redirect to the root page would be less confusing for a new user.
For best security, it could happen after a time delay.
Another security issue here is that the password entry field is a plain text entry control with all the consequent behaviors of that such as browser revealing the text, recording history, etc.
But anyway, without an SSL connection, at least during login. bypassing any security measures is trivial using simple packet capture and replay. Without SSL, this issue exists even when using private keys and tokens. To workaround this problem an SSH tunnel (or whatever other encrypted tunnel) would be needed to secure traffic with the server.

7 posts were merged into an existing topic: GraphQL (GQL) Security

Odd I can’t see how a windows user/account would have anything at all to do with Select Orders.

Yes indeed. It is very weird.
After meticulous testing and debugging I proved Automation behavior is different depending on the logged in windows user! Maybe it’s caused by a subtle timing dependency. I’m currently working on this issue by totally reworking that automation and code. I’ll get back you with results soon.

A post was merged into an existing topic: GraphQL (GQL) Security