Has anyone used extension - wiremock-graphql-exten...
# help
r
Has anyone used extension - wiremock-graphql-extension-0.9.0.jar for GraphqlBodyMatcher. 1. I am able to load this extension with dockerfile but not able to load it using jav- command to run standalone jar with this extension- keep on getting exception in thread main. 2. Have you got ignoreextravariables and query pattern to ise regex working with this extension?
l
What is the exception you are getting ?
r
@Lee Turner This is the error - I am using 3.10.0 version of wiremock
l
OK, there are a couple of things to note here: • It might be worth updating to the latests wiremock version - currently
3.12.1
• It looks like you are referencing the wrong main class to start wiremock • The graphql extension uses the extension loading mechanism so you don't have to specify it using the
--extensions
cli parameter • I don't think you need to use the graphql jar with all the dependencies This seems to work for me:
java -cp wiremock-graphql-extension-0.9.0.jar:wiremock-standalone-3.12.1.jar wiremock.Run
When it runs I see the extension loaded:
Copy code
➜ java -cp wiremock-graphql-extension-0.9.0.jar:wiremock-standalone-3.12.1.jar wiremock.Run

██     ██ ██ ██████  ███████ ███    ███  ██████   ██████ ██   ██
██     ██ ██ ██   ██ ██      ████  ████ ██    ██ ██      ██  ██
██  █  ██ ██ ██████  █████   ██ ████ ██ ██    ██ ██      █████
██ ███ ██ ██ ██   ██ ██      ██  ██  ██ ██    ██ ██      ██  ██
 ███ ███  ██ ██   ██ ███████ ██      ██  ██████   ██████ ██   ██

----------------------------------------------------------------
|               Cloud: <https://wiremock.io/cloud>               |
|                                                              |
|               Slack: <https://slack.wiremock.org>              |
----------------------------------------------------------------

version:                      3.12.1
port:                         8080
enable-browser-proxying:      false
disable-banner:               false
no-request-journal:           false
verbose:                      false

extensions:                   graphql-body-matcher,response-template,webhook