graphql_rails icon indicating copy to clipboard operation
graphql_rails copied to clipboard

Add `implements` support for models

Open povilasjurcys opened this issue 1 year ago • 1 comments

This PR adds basic interface support for GraphqlRails::Model.

Usage:

module VisitorInterface
  include GraphQL::Schema::Interface
  
  field :failed_logins_count, Integer
end

class UserDecorator
  include GraphqlRails::Model

  graphql do |c|
    c.implements(VisitorInterface)
    # ...
  end
end

povilasjurcys avatar Dec 22 '23 10:12 povilasjurcys