A credit represents the complexity of running a query in your Slash GraphQL backend. Credits are calculated based on the number of nodes that are accessed.
- A simple query that reads upto 1000 nodes costs a single credit
- A query that accesses 1000-10k nodes costs 2 credits
- A query that accesses 10k-100k nodes costs 3 credits
- A query that accesses 100k-1M nodes costs 4 credits
- And continues logarithmically beyond that.
We’ve chosen a log based scale between TouchedNodes and QueryCost to help make your planning easier. We don’t really want you worry about the difference between touching 2400 nodes and 2600 nodes, but if a query is 10x more complex, we’ll charge you an extra credit.
Astute readers will notice that firing a single query that touches 500 nodes will be cheaper than firing 5 queries that each read 100 nodes, thus multiple query blocks into a single /graphql request is a great way to reduce the number of credits your app consumes.