Method: GraphQL::Schema::Resolver#ready?

Defined in:
lib/graphql/schema/resolver.rb

#ready?(**args) ⇒ Boolean, early_return_data

Called before arguments are prepared. Implement this hook to make checks before doing any work.

If it returns a lazy object (like a promise), it will be synced by GraphQL (but the resulting value won't be used).

Parameters:

  • args (Hash)

    The input arguments, if there are any

Returns:

  • (Boolean, early_return_data)

    If false, execution will stop (and early_return_data will be returned instead, if present.)

Raises:



140
141
142
# File 'lib/graphql/schema/resolver.rb', line 140

def ready?(**args)
  true
end