Skip to Content
DocsPlatformSchema Polling

Schema Polling

Stellate Schema Polling gives you the ability to update your schema changes. With the ease of clicking a synchronization button or setting a polling toggle, you can ensure that your schema has the most up-to-date information.

Schema Polling in the Stellate dashboard

GraphQL Introspection

Stellate runs GraphQL introspection queries against your origin to get information about the schema of the origin GraphQL API. This enables populating Stellate metrics with even more useful information. At Stellate we do that whenever you update your config. However, discrepancies can creep in over time.

To update schema information, prior to the introduction of Schema Polling, you would need to enable introspection on the origin and have Stellate update the schema whenever the configuration is updated. However, if the schema changes without updating the configuration, Stellate would not know about the changes unless you manually pushed the schema information using the Stellate CLI. Stellate Schema Polling, however allows Stellate to automatically check for schema changes and update the stored schema information every 12 minutes.

Update the Schema with a CLI Command

If you change your origin schema, you can manually update the information for Stellate by using the Stellate CLI to push this schema information. In the CLI, you can use the command stellate push schemato push just the schema information. For details, read about the Push CLI command.

Once run, this subcommand updates Stellate with your newest schema information. To automate the update, you would need to set this up in in your CI/CD process, so that every time you push some of these schema changes, you also send the changes to Stellate.

Benefits of Schema Polling

The main benefits of Schema Polling are:

Automatic schema updates

Stellate will automatically check for schema changes, every 12 minutes, and update the stored schema information, without the need to manually push the schema changes.

Easier setup

Enabling Schema Polling can be done through a simple configuration setting, without the need to set up a CI/CD process to push schema changes.

How to Enable Schema Polling

To enable Schema Polling, you can follow these steps:

  1. Go to Services > YourService > Config > General in the Stellate dashboard.
  2. Scroll down to the Schema section to the Enable schema polling option.
  3. Click the toggle to enable Schema Polling.

Validate schema polling

After enabling Schema Polling, you can check that it’s working by checking your schema in the Config file section of the Stellate dashboard for updates.

Synchronize the Schema

You can also manually synchronize the schema, at any time. To do this:

  1. Go to Services > YourService > Config > General in the Stellate dashboard.
  2. Scroll down to the Schema section to the Schema polling option.
  3. Click the Synchronize Now button to manually synchronize the schema.

This will trigger Stellate to reach out to the origin, perform the introspection query, and update the schema information stored in the database.

That’s all you need to keep your schema current!

Last updated on