Is GlideRecord_Mutation documented?

Pablo Beltran
Tera Contributor

Hi ServiceNow Team!

 

Is there any documentation about the GlideRecord API with GraphQL?

 

It is available under this path: /api/now/graphql

 

We are able to query data with GlideRecord_Query (a sort of SELECT).

 

However, we are unable to figure out the syntax for mutations (INSERT, UPDATE, DELETE).

 

Might you provide a link to the documentation or a simple example of them?

 

Thanks in advance,

Pablo

8 REPLIES 8

DrewW
Mega Sage
Mega Sage

Have you looked at this?

https://www.servicenow.com/community/developer-articles/getting-started-graphql-api-framework/ta-p/2...

 

They talk about creating a mutation to close an incident.

 

Pablo Beltran
Tera Contributor

Hi @DrewW ,

 

Thanks for the link, but I am afraid that is to create a custom GraphQL implementation which is not what I was asking about.

 

There is already an ServiceNow's official implementation of GrpahQL over the GlideRecord API:

 

https://serviceportal.io/graphql-in-servicenow/

 

That API is available under the /api/now/graphql path since the Paris version.

 

Unfortunately, that API seems undocumented.

 

Bests,

Pablo

I think you are going to have to build something yourself or you are going to have to log a support case and ask ServiceNow if they added mutations to do updates.  It feels like to me that they did not but since there are no docs only ServiceNow can answer the question.

 

This is one of my biggest complaints about ServiceNow.  They routinely don't document things or the docs are so basic that they are not very useful.