Skip to main content
Version: Beta

GraphQL Best Practices

Here are some tips on how customers can use your API with best practices:

Understand the schema

It's important for customers to understand the schema of our API to know what data they can request and how to structure their queries. Take time exploring the Developer Portal to know technically the best way to access information from AlphaSense.

Use fragments to reuse query components

To reduce duplication in queries, customers should use fragments to define reusable query components that can be included in multiple queries. This can also help make queries more readable and easier to understand. For example, our “companies” component is widely used across multiple APIs and customers can use a query builder in order to construct clear and consistent queries.

Utilize the helper functions

Sometimes GraphQL outputs can get complex. When transferring the API response, utilize the pre-built functions for converting the output to a data frame or various excel formats (.csv, .tsv).

Leverage query variables

Query variables can be used to pass dynamic values to a query, such as search parameters or pagination. Encourage customers to use query variables to make their queries more flexible and reusable.

Make suggestions

AlphaSense is committed to improving the developer experience for our APIs. Please reach out with any questions, concerns, or suggestions so that we can optimize your experience!

Stay up-to-date with changes

Always keep an eye out for changes in the changelog. It is important to stay on top of deprecations in variables to prevent any breaking issues. We have an up-to-date changelog located here**