Sha256: 15e6d9c68d83ab6ca5b06691640b346dd086e6a6358106445236a76fe69b19c5

Contents?: true

Size: 1.09 KB

Versions: 5

Compression:

Stored size: 1.09 KB

Contents

# frozen_string_literal: true

module Osso
  module GraphQL
    module Types
      class QueryType < ::GraphQL::Schema::Object
        field :enterprise_accounts, null: true, resolver: Resolvers::EnterpriseAccounts do
          argument :sort_column, String, required: false
          argument :sort_order, String, required: false
        end

        field :enterprise_account, null: true, resolver: Resolvers::EnterpriseAccount do
          argument :domain, String, required: true
        end

        field :oauth_clients, null: true, resolver: Resolvers::OAuthClients

        field(
          :identity_provider,
          Types::IdentityProvider,
          null: true,
          resolve: ->(_obj, args, _context) { Osso::Models::IdentityProvider.find(args[:id]) },
        ) do
          argument :id, ID, required: true
        end

        field(
          :oauth_client,
          Types::OauthClient,
          null: true,
          resolve: ->(_obj, args, _context) { Osso::Models::OauthClient.find(args[:id]) },
        ) do
          argument :id, ID, required: true
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
osso-0.0.3.16 lib/osso/graphql/query.rb
osso-0.0.3.15 lib/osso/graphql/query.rb
osso-0.0.3.14 lib/osso/graphql/query.rb
osso-0.0.3.13 lib/osso/graphql/query.rb
osso-0.0.3.12 lib/osso/graphql/query.rb