Project Setup
Learn about how to set up your project to use the Gatling GraphQL protocol.
License and limitations
The Gatling GraphQL component is distributed under the Gatling Enterprise Component License.
The Gatling GraphQL protocol can be used with both the Community Edition and Enterprise versions of Gatling.
Its usage is unlimited when running tests on Gatling Enterprise. When used with Gatling Community Edition, usage is limited to:
- 5 users maximum
- 5 minute duration tests
Limits after which the test will stop. This means that all locally executed tests using the GraphQL protocol are limited by these values.
Adding the Gatling GraphQL dependency
The Gatling GraphQL plugin is not included with Gatling by default. Add the Gatling GraphQL dependency, in addition to the usual Gatling dependencies.
GraphQL requires Gatling 3.16.0 or later.
For Java or Kotlin:
<dependencies>
<dependency>
<groupId>io.gatling</groupId>
<artifactId>gatling-graphql-java</artifactId>
<version>3.16.0.1</version>
<scope>test</scope>
</dependency>
</dependencies>
Base Gatling setup for Maven is documented here.
dependencies {
gatlingImplementation("io.gatling:gatling-graphql-java:3.16.0.1")
}
Base Gatling setup for Gradle is documented here.
For Scala:
<dependencies>
<dependency>
<groupId>io.gatling</groupId>
<artifactId>gatling-graphql</artifactId>
<version>3.16.0.1</version>
<scope>test</scope>
</dependency>
</dependencies>
Base Gatling setup for Maven is documented here.
dependencies {
gatlingImplementation("io.gatling:gatling-graphql:3.16.0.1")
}
Base Gatling setup for Gradle is documented here.
libraryDependencies += "io.gatling" % "gatling-graphql" % "3.16.0.1" % "test,it"
Base Gatling setup for sbt is documented here.
JavaScript and TypeScript are not supported yet.
Getting started with the demo project
A demo project is available to help you get started with the Gatling GraphQL protocol.