Sha256: 58f99c2e9b22a0608e394e324fd7e2796a2acdfba6518adc8153a7c15561f265

Contents?: true

Size: 403 Bytes

Versions: 5

Compression:

Stored size: 403 Bytes

Contents

DateBookSchema = GraphQL::Schema.define do
  # mutation(Types::MutationType)
  query(Types::QueryType)
  resolve_type ->(type, obj, ctx) do
    case obj
    when Profile
      Types::ProfileType
    when Calendar
      Types::CalendarType
    when Event
      Types::EventType
    when EventOccurrence
      Types::EventOccurrenceType
    else
      raise("Unexpected object: #{obj}")
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
date_book-0.0.6 app/graphql/date_book_schema.rb
date_book-0.0.5 app/graphql/date_book_schema.rb
date_book-0.0.3 app/graphql/date_book_schema.rb
date_book-0.0.2 app/graphql/date_book_schema.rb
date_book-0.0.1 app/graphql/date_book_schema.rb