Integrator's GraphQL API Guide

#221

Hi @emre

Yes, I understand, but I am doing a lot of manipulation to the raw SQL data to display it in a format (with caching) that our staff can have at their fingertips on their phones/tablets in the dive center.

In the screen shot below you can see the result. This is essentially taking a whole bunch of order and their associated order tags to group the orders by dive trip and additional tags are used to link instructors to clients in the left hand column (the series of colored letters). Also, the equipment (BCD, Reg, Mask etc…) are taken from the customer entity. The resulting web page if very quick to load and is available everywhere they have their phones.

What I am trying to do is to make small things available to edit right from this web page, for example I want to be able to quikcly and easily change the “DIN” order tag to “Yoke” - This does not have a price associated with it, it is purely there for planning purposes.

I know the design does not look great, but this is a lot of information displayed on just one screen and I have gone for a design that closes mimicks the original paper based system that we have used for years (I didn’t want to throw too many changes at the team at once!).

#222

is there any query to get list of all menus that we have without writing exact menu name?

#223

All queries are documented in the graphiql interface.

#224

I see, but there is only getMenu query with “name” argument. I was asking, maybe there is another option to load full list of menus at once? As i know sambapos mobile client also works with messaging server and it provides with list of menus that we have in database without writing exact name.

#225

If a full list of menus isnt available at the minute as a backup alternative you could make a simple SQL query to DB to get a list of menu names or if remote and no easy DB direct access you could program in a list on menu names. Surely the menu names wont change too often.

#226

Mobile client has some functions that were coded directly into message server that are not using graphql. It used to use an app for it but they built it into message server.

#227

No there isnt a query like that for now. Bu i noted that

1 Like
#228

Sir,
How to print bill through GraphQL API.?

#229

You need to be more specific because if you are using the terminalticket functions it will use the automation in Sambapos for printing.

#231

I am trying to print a ticket from Api.
But this code is not working .

#232

Just want to print a ticket by giving the ticketID from API .

#233

I do not think executePrintJob is a gql query. Have you verified that is available? I could be wrong I have not used it in a while.

1 Like
#234

yes this is querry(mutation) i checked this in the docs.

1 Like
#235

According to the API it worked… are you executing the gql from the computer the printer is attatched to?

#236

Yes , the same system where samba is running.
Printer are configured in this system.
Printers are network printers.

#237

Ok so order states PAID do not exixt… It should be Submitted or New. Paid is a ticket state not order state.

1 Like
#238

Ok . What if i dont want to play with order states.
Just want to give the ticket number and it will print that ticket without playing with the states of the orders.

#239

You need to tell it what to print. Are you trying to print submitted tickets?

#240

Just take the states part of the gql out then.

#241

Please don’t create multiple topics for this it won’t get you help faster. This post is enough.

4 Likes