class GraphQL::Schema::Visibility::Migration

You can use this to see how GraphQL::Schema::Warden and GraphQL::Schema::Visibility::Profile handle .visible? differently in your schema.

It runs the same method on both implementations and raises an error when the results diverge.

To fix the error, modify your schema so that both implementations return the same thing. Or, open an issue on GitHub to discuss the difference.

This plugin adds overhead to runtime and may cause unexpected crashes – don’t use it in production!

This plugin adds two keys to context when running:

Use those keys to modify your visible? behavior as needed.

Also, in a pinch, you can set skip_visibility_migration_error: true in context to turn off this behavior per-query. (In that case, it uses Profile directly.)

Examples

Example: Adding this plugin

use GraphQL::Schema::Visibility, migration_errors: true