How to write script for login users

I’m working on preparing scripts for load tests of the app which uses GraphQL requests. I’m stuck at the login stage. I have no idea how to make it possible to use dynamic variables. I am a very beginner to Gatling. Maybe someone could advise me with an example?

There are plenty of examples in the tutorials and the Gatling Academy. You should check them.

Perhaps I can use:

.body(RawFileBody("#{payloadPath}"))

and a few json files with credentials for test users.
Is is a good idea?
I have to send emails and passwords of my test users in GraphQL query.

Yes, I went through Gatling Academy both modules and I was searching the tutorials. But I did not find any example for GraphQL requests.

I’ve just managed it. I used feeder and
.body(StringBody("{“query”:“query{mosn{subject}}”}"))
My test users log in.

You won’t find any tutorial dedicated to GraphQL. GraphQL is just JSON over HTTP.

Ok, that’s right.
Thank you.