Ask a Question

Random value in the GraphQL Header

SOLVED
mogranovitch
Occasional Contributor

Random value in the GraphQL Header

Hi!

For each graphQL call I need to submit executionId UUID value as one of the Headers values.

Is there a way to use something like "${java.util.UUID.randomUUID()}" directly in the Headers to generate brand new id on the fly?

Currently it's not generating any value and sends empty string so I have to use previously generated property value.

 

Thanks!

1 REPLY 1
AlexKaras
Champion Level 3

Hi,

 

something like "${java.util.UUID.randomUUID()}"

I did not try exactly your case with GraphQL, but https://www.soapui.org/docs/scripting-and-properties/property-expansion/#2-Dynamic-Properties makes me hope that this might work:

${=java.util.UUID.randomUUID()}

(note added equal sign (=))

 

Regards,
  /Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
cancel
Showing results for 
Search instead for 
Did you mean: