Found another little thing im stuck on.
How do i get the Order Tag Groups and the tags inside each group?
So at the moment, i need to figure out:
• How to Get Order Tag Groups
• How to get all the order tags with their prices within each group.
• How to edit an entity
• How to add these order tags with prices to the ticket.
But it definitely exists. Copied directly from the data that came through on getMenuItems()
Tried other products first, suspected space or something to be the issue so took the item without a space in the name… But that doesn’t seem to be the issue.
I tried to check with the Docs section on top right, and it had the options for ‘id’ and ‘uid’ for orders.
So i also tried adding ‘id’ but that just gave me error as invalid argument.
None of my products have more than one Portion type.
I’m currently in talks with my brother about creating an App for my business which will give them a login and password, they’ll get their membership number added to the app on login and various other perks… getting info from the till would be pretty sick…
You can get idea of some advanced gql use here. This is a proof of concept project we have going with beta team. This only works with current beta as it required gql features not released yet but you can get idea by looking at source.
Hi, is it possible to extend the GraphQL functions? I am thinking about making some modifications to the DB, and I’m looking for a way to enable access to new tables/fields via GraphQL. For example, if I add a new “feedback” column to the tickets table, I’m hoping to extend the Tickets schema to expose a “feedback” string property. Thanks!
No, not for you and I. Emre and the Dev Team will decide which Queries and Mutations are added to GraphQL as it pertains to SambaPOS. You cannot extend it yourself.
Don’t do that. There is no good reason to do so.
That is not the purpose of GQL. GraphQL, though a Query Language, is not generally used for DB manipulation. Currently, there is no GQL Queries or Mutations available to directly access the SambaPOS DB. While some queries may come to be, they will almost certainly never be capable of altering the DB schema.
There is no reason to add a Feedback column to the Tickets Table. Use a Ticket Tag instead.
When I edit a Ticket’s tag via graphql, is there a way to trigger a UI refresh if I am currently viewing the ticket in the POS? It seems that I have to close the ticket view and then reopen it to see the tags updated. Thanks!
I’m actually working on a custom web app that uses the ticket tags to store additional ticket data. The web app integrates with a number of other non-samba related services, so I prefer to not implement it natively within Samba. Thanks!
Hmm I think you should start a new thread and be sure and share any information like that so we can focus our help. Its hard to know what your trying to do sometimes if you dont explain that.
mutation m { executePrintJob(name: “Orders to Kitchen”, ticketId: 3740, orderStateFilters: [{stateName: “Status”, state: “New”}], nextOrderStates:[{stateName:“Status”,currentState:“New”,state:“Submitted”}]) { name } }
sometimes replies with a success JSON, and sometimes it does not.
Even when the return JSON shows success, nothing is printed, and the order states are not updated either.
Out of countless tests, i had one successful print, and the very same query with a new ticket ID failed.
Trying in the GraphiQL window, the loader is spinning for ever.
So after I tried setting messaging server port to “8383+” on MessagingServerServiceTool, now another PC will not connect to messaging server unless I add additonal firewall to whitelist 8383 port inbound, then it will work.
This is weird because in the previous ‘non-GraphQL version’ I only need to white-list MessagingServerServiceTool and call it a day. Any particular reason why this is the case?
Once you tried setting the port with GraphQL enabled (E.g. 8383+), you can never turn that feature off again on MessagingServerServiceTool.exe (i.e. you can’t revert the port back to 8383) even if the service is stopped and uninstalled (normal 8383 port on MessagingServer.exe works fine, however)
There are two message server implementations. By adding + to port number new signalr based implementation starts working to allow messaging between SambaPOS and HTML apps. It also starts serving html apps through that port. That’s why that additional configuration is needed.
Im not sure yet, but i think there are issues with the Execute Print Command.
90% of the times i get ‘Error trying to resolve executePrintJob’. Every once in a while, everything goes well…
Is there something im missing?
here is my flow:
Check if customer exists. If not, create
Create Ticket
Print Orders to kitchen.
I printed out the query to test in the Graphiql browser view, same thing there… works sometimes, but mostly does not.
There are times when i’ve had to restart the samba message service. So i need to isolate and figure out what is causing this. Its an integration with a website. Having most of the orders fail because of a print job execution can be very problematic to organise with. The kitchen will lose track.
By the way, any proper update on how to update/edit entity(Customer profile) via this API ?