Best Practices

Recommended tips for effective use of Apollo Explorer

1. Use the saved collection first

The collection is a library of operations. Start there instead of writing operations from scratch.


2. Keep queries small

GraphQL is very powerful so it's tempting to write queries that return lots of information about large numbers of devices, but keep in mind that larger queries take longer to resolve. Consider your application and how your users will interact with it.

Do you need to list a thousand devices or would it be more performant to return a smaller data set and allow the user to search or paginate? Similarly, rather than returning all the data about every asset, return enough data to allow the user to identify the assets they are interested in and then use a query to return detailed information for just the assets they are interested in.


3. Use variables for anything that changes

Use the Variables panel for IDs, dates, filters, and paging. This keeps queries reusable.


4. Expect different results per user

Two people can run the same query and see different results because access and product entitlements can differ.


5. Keep tokens private

Treat tokens like passwords:

  • never paste them into docs.
  • never store them inside queries or variables.
  • never include them in screenshots.

This is particularly relevant if sharing operations.


6. If you're stuck, simplify

When an operation fails:

  • Revert to the original operation.
  • Confirm it runs.
  • Reapply your changes one at a time.

Checklist

Mark this step complete

Mark as complete

Tick to save your progress for this tutorial.