How does one set up (database, or other) context in a GraphQL resolver?

How does one set up (database, or other) context in a GraphQL resolver?

The GraphQL docs give an example of a resolver function that accepts an argument called “context”.
They have to say this about it –

context A value which is provided to every resolver and holds important contextual … Read the rest “How does one set up (database, or other) context in a GraphQL resolver?”