summaryrefslogtreecommitdiff
path: root/doc/development/graphql_guide
diff options
context:
space:
mode:
Diffstat (limited to 'doc/development/graphql_guide')
-rw-r--r--doc/development/graphql_guide/authorization.md4
-rw-r--r--doc/development/graphql_guide/batchloader.md2
2 files changed, 3 insertions, 3 deletions
diff --git a/doc/development/graphql_guide/authorization.md b/doc/development/graphql_guide/authorization.md
index a317b5d805b..d7edd01cda2 100644
--- a/doc/development/graphql_guide/authorization.md
+++ b/doc/development/graphql_guide/authorization.md
@@ -142,7 +142,7 @@ to view the `secretName` field:
```ruby
module Types
class ProjectType < BaseObject
- field :secret_name, ::GraphQL::STRING_TYPE, null: true, authorize: :owner_access
+ field :secret_name, ::GraphQL::Types::String, null: true, authorize: :owner_access
end
end
```
@@ -179,7 +179,7 @@ as an array instead of as a single value:
```ruby
module Types
class MyType < BaseObject
- field :hidden_field, ::GraphQL::INT_TYPE,
+ field :hidden_field, ::GraphQL::Types::Int,
null: true,
authorize: [:owner_access, :another_ability]
end
diff --git a/doc/development/graphql_guide/batchloader.md b/doc/development/graphql_guide/batchloader.md
index 1869c6e6f80..0e90f89ff7a 100644
--- a/doc/development/graphql_guide/batchloader.md
+++ b/doc/development/graphql_guide/batchloader.md
@@ -29,7 +29,7 @@ For example, to load a `User` by `username`, we can add batching as follows:
```ruby
class UserResolver < BaseResolver
type UserType, null: true
- argument :username, ::GraphQL::STRING_TYPE, required: true
+ argument :username, ::GraphQL::Types::String, required: true
def resolve(**args)
BatchLoader::GraphQL.for(username).batch do |usernames, loader|