File: field_type.rb

package info (click to toggle)
ruby-graphql 2.5.19-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 13,868 kB
  • sloc: ruby: 80,420; ansic: 1,808; yacc: 845; javascript: 480; makefile: 6
file content (18 lines) | stat: -rw-r--r-- 772 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
class Types::Query
  field :current_account, Types::Account, null: false, description: "The account of the current viewer"

  field :find_account, Types::Account do
    argument :id, ID
  end

  # Don't modify these:
  field :current_time, String, description: "The current time in the viewer's timezone"
  field :current_time, Integer, description: "The current time in the viewer's timezone"
  field :current_time, Int, description: "The current time in the viewer's timezone"
  field :current_time, Float, description: "The current time in the viewer's timezone"
  field :current_time, Boolean, description: "The current time in the viewer's timezone"

  field(:all_accounts, [Types::Account, null: false]) {
    argument :active, Boolean, default_value: false
  }
end