Random value in the GraphQL Header
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2022
12:16 PM
02-07-2022
12:16 PM
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!
Solved! Go to Solution.
Labels:
- Labels:
-
Function Tests
-
Scripting
-
Test Setup
1 REPLY 1
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2022
01:19 PM
02-07-2022
01:19 PM
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
================================
/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
================================
