This example illustrates isolating operations between users. Commonly used in a multi user environment.
Specify a keyGenerator
function which uses contextual information from the resolver's context
.
In this example, a user is identified by the IP address of the request.
yarn install
node index.js
Navigate to http://localhost:4000/graphql
in a browser.
Server is configured to allow each root field to be queried once every 15 seconds. Sample query:
{
quote
books {
title
author
}
}