We have been looking in to the GraphQL API as an alternative to what we currently use. However, there are some strange performance issues which don’t seem to make sense.
Our test setup is fairly simple:
Custom JWT Authentication which populates token.sub in to user.data.tokenId
One collection: Users
- readAll when: when the %%user.data.tokenId matches the users.tokenId field
- default denyAllAccess
One index: user.tokenId
There are only two records in the users collection at the moment and the query is only returning a single attribute which is about 32 chars.
The results we are seeing are that the query consistently takes about 1.5-3 seconds round trip.
To produce an auth error before the query runs, and get an idea of latency due to global location - we removed the jwtTokenString from the request header which drops the request time down to ~70ms