Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
16808abf
Commit
16808abf
authored
Dec 13, 2021
by
Brett Walker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make cop recognize GraphQL::FLOAT_TYPE as old
and update code to use `GraphQL::Types::Float`
parent
6bd49db5
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
62 additions
and
55 deletions
+62
-55
app/graphql/types/ci/job_type.rb
app/graphql/types/ci/job_type.rb
+1
-1
app/graphql/types/ci/pipeline_type.rb
app/graphql/types/ci/pipeline_type.rb
+1
-1
app/graphql/types/ci/test_case_type.rb
app/graphql/types/ci/test_case_type.rb
+1
-1
app/graphql/types/ci/test_report_total_type.rb
app/graphql/types/ci/test_report_total_type.rb
+1
-1
app/graphql/types/ci/test_suite_summary_type.rb
app/graphql/types/ci/test_suite_summary_type.rb
+1
-1
app/graphql/types/ci/test_suite_type.rb
app/graphql/types/ci/test_suite_type.rb
+1
-1
app/graphql/types/merge_request_connection_type.rb
app/graphql/types/merge_request_connection_type.rb
+1
-1
app/graphql/types/project_statistics_type.rb
app/graphql/types/project_statistics_type.rb
+10
-10
app/graphql/types/root_storage_statistics_type.rb
app/graphql/types/root_storage_statistics_type.rb
+9
-9
doc/development/api_graphql_styleguide.md
doc/development/api_graphql_styleguide.md
+2
-2
ee/app/graphql/ee/mutations/ci/runner/update.rb
ee/app/graphql/ee/mutations/ci/runner/update.rb
+2
-2
ee/app/graphql/ee/types/ci/runner_type.rb
ee/app/graphql/ee/types/ci/runner_type.rb
+2
-2
ee/app/graphql/ee/types/namespace_type.rb
ee/app/graphql/ee/types/namespace_type.rb
+5
-5
ee/app/graphql/ee/types/project_type.rb
ee/app/graphql/ee/types/project_type.rb
+2
-2
ee/app/graphql/types/ci/code_coverage_activity_type.rb
ee/app/graphql/types/ci/code_coverage_activity_type.rb
+1
-1
ee/app/graphql/types/ci/code_coverage_summary_type.rb
ee/app/graphql/types/ci/code_coverage_summary_type.rb
+1
-1
ee/app/graphql/types/ci/minutes/namespace_monthly_usage_type.rb
.../graphql/types/ci/minutes/namespace_monthly_usage_type.rb
+3
-3
ee/app/graphql/types/ci/minutes/project_monthly_usage_type.rb
...pp/graphql/types/ci/minutes/project_monthly_usage_type.rb
+2
-2
rubocop/cop/graphql/old_types.rb
rubocop/cop/graphql/old_types.rb
+2
-1
spec/rubocop/cop/graphql/old_types_spec.rb
spec/rubocop/cop/graphql/old_types_spec.rb
+11
-5
spec/support/graphql/field_inspection.rb
spec/support/graphql/field_inspection.rb
+1
-1
spec/tooling/graphql/docs/renderer_spec.rb
spec/tooling/graphql/docs/renderer_spec.rb
+2
-2
No files found.
app/graphql/types/ci/job_type.rb
View file @
16808abf
...
...
@@ -76,7 +76,7 @@ module Types
description:
'Indicates the job is active.'
field
:stuck
,
GraphQL
::
Types
::
Boolean
,
null:
false
,
method: :stuck?
,
description:
'Indicates the job is stuck.'
field
:coverage
,
GraphQL
::
FLOAT_TYPE
,
null:
true
,
field
:coverage
,
GraphQL
::
Types
::
Float
,
null:
true
,
description:
'Coverage level of the job.'
field
:created_by_tag
,
GraphQL
::
Types
::
Boolean
,
null:
false
,
description:
'Whether the job was created by a tag.'
...
...
app/graphql/types/ci/pipeline_type.rb
View file @
16808abf
...
...
@@ -45,7 +45,7 @@ module Types
field
:queued_duration
,
Types
::
DurationType
,
null:
true
,
description:
'How long the pipeline was queued before starting.'
field
:coverage
,
GraphQL
::
FLOAT_TYPE
,
null:
true
,
field
:coverage
,
GraphQL
::
Types
::
Float
,
null:
true
,
description:
'Coverage percentage.'
field
:created_at
,
Types
::
TimeType
,
null:
false
,
...
...
app/graphql/types/ci/test_case_type.rb
View file @
16808abf
...
...
@@ -18,7 +18,7 @@ module Types
field
:classname
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Classname of the test case.'
field
:execution_time
,
GraphQL
::
FLOAT_TYPE
,
null:
true
,
field
:execution_time
,
GraphQL
::
Types
::
Float
,
null:
true
,
description:
'Test case execution time in seconds.'
field
:file
,
GraphQL
::
Types
::
String
,
null:
true
,
...
...
app/graphql/types/ci/test_report_total_type.rb
View file @
16808abf
...
...
@@ -7,7 +7,7 @@ module Types
graphql_name
'TestReportTotal'
description
'Total test report statistics.'
field
:time
,
GraphQL
::
FLOAT_TYPE
,
null:
true
,
field
:time
,
GraphQL
::
Types
::
Float
,
null:
true
,
description:
'Total duration of the tests.'
field
:count
,
GraphQL
::
Types
::
Int
,
null:
true
,
...
...
app/graphql/types/ci/test_suite_summary_type.rb
View file @
16808abf
...
...
@@ -12,7 +12,7 @@ module Types
field
:name
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Name of the test suite.'
field
:total_time
,
GraphQL
::
FLOAT_TYPE
,
null:
true
,
field
:total_time
,
GraphQL
::
Types
::
Float
,
null:
true
,
description:
'Total duration of the tests in the test suite.'
field
:total_count
,
GraphQL
::
Types
::
Int
,
null:
true
,
...
...
app/graphql/types/ci/test_suite_type.rb
View file @
16808abf
...
...
@@ -12,7 +12,7 @@ module Types
field
:name
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Name of the test suite.'
field
:total_time
,
GraphQL
::
FLOAT_TYPE
,
null:
true
,
field
:total_time
,
GraphQL
::
Types
::
Float
,
null:
true
,
description:
'Total duration of the tests in the test suite.'
field
:total_count
,
GraphQL
::
Types
::
Int
,
null:
true
,
...
...
app/graphql/types/merge_request_connection_type.rb
View file @
16808abf
...
...
@@ -3,7 +3,7 @@
module
Types
# rubocop: disable Graphql/AuthorizeTypes
class
MergeRequestConnectionType
<
Types
::
CountableConnectionType
field
:total_time_to_merge
,
GraphQL
::
FLOAT_TYPE
,
null:
true
,
field
:total_time_to_merge
,
GraphQL
::
Types
::
Float
,
null:
true
,
description:
'Total sum of time to merge, in seconds, for the collection of merge requests.'
# rubocop: disable CodeReuse/ActiveRecord
...
...
app/graphql/types/project_statistics_type.rb
View file @
16808abf
...
...
@@ -6,26 +6,26 @@ module Types
authorize
:read_statistics
field
:commit_count
,
GraphQL
::
FLOAT_TYPE
,
null:
false
,
field
:commit_count
,
GraphQL
::
Types
::
Float
,
null:
false
,
description:
'Commit count of the project.'
field
:storage_size
,
GraphQL
::
FLOAT_TYPE
,
null:
false
,
field
:storage_size
,
GraphQL
::
Types
::
Float
,
null:
false
,
description:
'Storage size of the project in bytes.'
field
:repository_size
,
GraphQL
::
FLOAT_TYPE
,
null:
false
,
field
:repository_size
,
GraphQL
::
Types
::
Float
,
null:
false
,
description:
'Repository size of the project in bytes.'
field
:lfs_objects_size
,
GraphQL
::
FLOAT_TYPE
,
null:
false
,
field
:lfs_objects_size
,
GraphQL
::
Types
::
Float
,
null:
false
,
description:
'Large File Storage (LFS) object size of the project in bytes.'
field
:build_artifacts_size
,
GraphQL
::
FLOAT_TYPE
,
null:
false
,
field
:build_artifacts_size
,
GraphQL
::
Types
::
Float
,
null:
false
,
description:
'Build artifacts size of the project in bytes.'
field
:packages_size
,
GraphQL
::
FLOAT_TYPE
,
null:
false
,
field
:packages_size
,
GraphQL
::
Types
::
Float
,
null:
false
,
description:
'Packages size of the project in bytes.'
field
:wiki_size
,
GraphQL
::
FLOAT_TYPE
,
null:
true
,
field
:wiki_size
,
GraphQL
::
Types
::
Float
,
null:
true
,
description:
'Wiki size of the project in bytes.'
field
:snippets_size
,
GraphQL
::
FLOAT_TYPE
,
null:
true
,
field
:snippets_size
,
GraphQL
::
Types
::
Float
,
null:
true
,
description:
'Snippets size of the project in bytes.'
field
:pipeline_artifacts_size
,
GraphQL
::
FLOAT_TYPE
,
null:
true
,
field
:pipeline_artifacts_size
,
GraphQL
::
Types
::
Float
,
null:
true
,
description:
'CI Pipeline artifacts size in bytes.'
field
:uploads_size
,
GraphQL
::
FLOAT_TYPE
,
null:
true
,
field
:uploads_size
,
GraphQL
::
Types
::
Float
,
null:
true
,
description:
'Uploads size of the project in bytes.'
end
end
app/graphql/types/root_storage_statistics_type.rb
View file @
16808abf
...
...
@@ -6,14 +6,14 @@ module Types
authorize
:read_statistics
field
:storage_size
,
GraphQL
::
FLOAT_TYPE
,
null:
false
,
description:
'Total storage in bytes.'
field
:repository_size
,
GraphQL
::
FLOAT_TYPE
,
null:
false
,
description:
'Git repository size in bytes.'
field
:lfs_objects_size
,
GraphQL
::
FLOAT_TYPE
,
null:
false
,
description:
'LFS objects size in bytes.'
field
:build_artifacts_size
,
GraphQL
::
FLOAT_TYPE
,
null:
false
,
description:
'CI artifacts size in bytes.'
field
:packages_size
,
GraphQL
::
FLOAT_TYPE
,
null:
false
,
description:
'Packages size in bytes.'
field
:wiki_size
,
GraphQL
::
FLOAT_TYPE
,
null:
false
,
description:
'Wiki size in bytes.'
field
:snippets_size
,
GraphQL
::
FLOAT_TYPE
,
null:
false
,
description:
'Snippets size in bytes.'
field
:pipeline_artifacts_size
,
GraphQL
::
FLOAT_TYPE
,
null:
false
,
description:
'CI pipeline artifacts size in bytes.'
field
:uploads_size
,
GraphQL
::
FLOAT_TYPE
,
null:
false
,
description:
'Uploads size in bytes.'
field
:storage_size
,
GraphQL
::
Types
::
Float
,
null:
false
,
description:
'Total storage in bytes.'
field
:repository_size
,
GraphQL
::
Types
::
Float
,
null:
false
,
description:
'Git repository size in bytes.'
field
:lfs_objects_size
,
GraphQL
::
Types
::
Float
,
null:
false
,
description:
'LFS objects size in bytes.'
field
:build_artifacts_size
,
GraphQL
::
Types
::
Float
,
null:
false
,
description:
'CI artifacts size in bytes.'
field
:packages_size
,
GraphQL
::
Types
::
Float
,
null:
false
,
description:
'Packages size in bytes.'
field
:wiki_size
,
GraphQL
::
Types
::
Float
,
null:
false
,
description:
'Wiki size in bytes.'
field
:snippets_size
,
GraphQL
::
Types
::
Float
,
null:
false
,
description:
'Snippets size in bytes.'
field
:pipeline_artifacts_size
,
GraphQL
::
Types
::
Float
,
null:
false
,
description:
'CI pipeline artifacts size in bytes.'
field
:uploads_size
,
GraphQL
::
Types
::
Float
,
null:
false
,
description:
'Uploads size in bytes.'
end
end
doc/development/api_graphql_styleguide.md
View file @
16808abf
...
...
@@ -152,8 +152,8 @@ The `iid`, `title` and `description` are _scalar_ GraphQL types.
`title`
and
`description`
are regular
`GraphQL::Types::String`
types.
Note that the old scalar types
`GraphQL:ID`
,
`GraphQL::INT_TYPE`
,
`GraphQL::STRING_TYPE`
,
and
`GraphQL:BOOLEAN
_TYPE`
are no longer allowed. Please use
`GraphQL::Types::ID`
,
`GraphQL::Types::Int`
,
`GraphQL::Types::String`
,
and
`GraphQL::Types::Boolean
`
.
`GraphQL:BOOLEAN_TYPE`
, and
`GraphQL::FLOAT
_TYPE`
are no longer allowed. Please use
`GraphQL::Types::ID`
,
`GraphQL::Types::Int`
,
`GraphQL::Types::String`
,
`GraphQL::Types::Boolean`
, and
`GraphQL::Types::Float
`
.
When exposing a model through the GraphQL API, we do so by creating a
new type in
`app/graphql/types`
. You can also declare custom GraphQL data types
...
...
ee/app/graphql/ee/mutations/ci/runner/update.rb
View file @
16808abf
...
...
@@ -9,11 +9,11 @@ module EE
extend
::
Gitlab
::
Utils
::
Override
prepended
do
argument
:public_projects_minutes_cost_factor
,
GraphQL
::
FLOAT_TYPE
,
argument
:public_projects_minutes_cost_factor
,
GraphQL
::
Types
::
Float
,
required:
false
,
description:
'Public projects\' "minutes cost factor" associated with the runner (GitLab.com only).'
argument
:private_projects_minutes_cost_factor
,
GraphQL
::
FLOAT_TYPE
,
argument
:private_projects_minutes_cost_factor
,
GraphQL
::
Types
::
Float
,
required:
false
,
description:
'Private projects\' "minutes cost factor" associated with the runner (GitLab.com only).'
end
...
...
ee/app/graphql/ee/types/ci/runner_type.rb
View file @
16808abf
...
...
@@ -7,9 +7,9 @@ module EE
extend
ActiveSupport
::
Concern
prepended
do
field
:public_projects_minutes_cost_factor
,
GraphQL
::
FLOAT_TYPE
,
null:
true
,
field
:public_projects_minutes_cost_factor
,
GraphQL
::
Types
::
Float
,
null:
true
,
description:
'Public projects\' "minutes cost factor" associated with the runner (GitLab.com only).'
field
:private_projects_minutes_cost_factor
,
GraphQL
::
FLOAT_TYPE
,
null:
true
,
field
:private_projects_minutes_cost_factor
,
GraphQL
::
Types
::
Float
,
null:
true
,
description:
'Private projects\' "minutes cost factor" associated with the runner (GitLab.com only).'
end
end
...
...
ee/app/graphql/ee/types/namespace_type.rb
View file @
16808abf
...
...
@@ -7,17 +7,17 @@ module EE
prepended
do
field
:additional_purchased_storage_size
,
GraphQL
::
FLOAT_TYPE
,
GraphQL
::
Types
::
Float
,
null:
true
,
description:
'Additional storage purchased for the root namespace in bytes.'
field
:total_repository_size_excess
,
GraphQL
::
FLOAT_TYPE
,
GraphQL
::
Types
::
Float
,
null:
true
,
description:
'Total excess repository size of all projects in the root namespace in bytes.'
field
:total_repository_size
,
GraphQL
::
FLOAT_TYPE
,
GraphQL
::
Types
::
Float
,
null:
true
,
description:
'Total repository size of all projects in the root namespace in bytes.'
...
...
@@ -33,13 +33,13 @@ module EE
description:
'Number of projects in the root namespace where the repository size exceeds the limit.'
field
:actual_repository_size_limit
,
GraphQL
::
FLOAT_TYPE
,
GraphQL
::
Types
::
Float
,
null:
true
,
description:
'Size limit for repositories in the namespace in bytes.'
,
method: :actual_size_limit
field
:storage_size_limit
,
GraphQL
::
FLOAT_TYPE
,
GraphQL
::
Types
::
Float
,
null:
true
,
description:
'Total storage limit of the root namespace in bytes.'
...
...
ee/app/graphql/ee/types/project_type.rb
View file @
16808abf
...
...
@@ -97,12 +97,12 @@ module EE
description:
'DAST Site Validations associated with the project.'
field
:repository_size_excess
,
GraphQL
::
FLOAT_TYPE
,
GraphQL
::
Types
::
Float
,
null:
true
,
description:
'Size of repository that exceeds the limit in bytes.'
field
:actual_repository_size_limit
,
GraphQL
::
FLOAT_TYPE
,
GraphQL
::
Types
::
Float
,
null:
true
,
description:
'Size limit for the repository in bytes.'
,
method: :actual_size_limit
...
...
ee/app/graphql/types/ci/code_coverage_activity_type.rb
View file @
16808abf
...
...
@@ -7,7 +7,7 @@ module Types
graphql_name
'CodeCoverageActivity'
description
'Represents the code coverage activity for a group'
field
:average_coverage
,
GraphQL
::
FLOAT_TYPE
,
null:
true
,
field
:average_coverage
,
GraphQL
::
Types
::
Float
,
null:
true
,
description:
'Average percentage of the different code coverage results available for the group.'
field
:coverage_count
,
GraphQL
::
Types
::
Int
,
null:
true
,
...
...
ee/app/graphql/types/ci/code_coverage_summary_type.rb
View file @
16808abf
...
...
@@ -7,7 +7,7 @@ module Types
graphql_name
'CodeCoverageSummary'
description
'Represents the code coverage summary for a project'
field
:average_coverage
,
GraphQL
::
FLOAT_TYPE
,
null:
true
,
field
:average_coverage
,
GraphQL
::
Types
::
Float
,
null:
true
,
description:
'Average percentage of the different code coverage results available for the project.'
field
:coverage_count
,
GraphQL
::
Types
::
Int
,
null:
true
,
...
...
ee/app/graphql/types/ci/minutes/namespace_monthly_usage_type.rb
View file @
16808abf
...
...
@@ -8,17 +8,17 @@ module Types
class
NamespaceMonthlyUsageType
<
BaseObject
graphql_name
'CiMinutesNamespaceMonthlyUsage'
field
:month
,
::
GraphQL
::
STRING_TYPE
,
null:
true
,
field
:month
,
::
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Month related to the usage data.'
field
:minutes
,
::
GraphQL
::
INT_TYPE
,
null:
true
,
field
:minutes
,
::
GraphQL
::
Types
::
Int
,
null:
true
,
method: :amount_used
,
description:
'Total number of minutes used by all projects in the namespace.'
field
:projects
,
::
Types
::
Ci
::
Minutes
::
ProjectMonthlyUsageType
.
connection_type
,
null:
true
,
description:
'CI minutes usage data for projects in the namespace.'
field
:shared_runners_duration
,
::
GraphQL
::
INT_TYPE
,
null:
true
,
field
:shared_runners_duration
,
::
GraphQL
::
Types
::
Int
,
null:
true
,
description:
'Total numbers of minutes used by the shared runners in the namespace.'
def
month
...
...
ee/app/graphql/types/ci/minutes/project_monthly_usage_type.rb
View file @
16808abf
...
...
@@ -8,11 +8,11 @@ module Types
class
ProjectMonthlyUsageType
<
BaseObject
graphql_name
'CiMinutesProjectMonthlyUsage'
field
:minutes
,
::
GraphQL
::
INT_TYPE
,
null:
true
,
field
:minutes
,
::
GraphQL
::
Types
::
Int
,
null:
true
,
method: :amount_used
,
description:
'Number of CI minutes used by the project in the month.'
field
:name
,
::
GraphQL
::
STRING_TYPE
,
null:
true
,
field
:name
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Name of the project.'
def
name
...
...
rubocop/cop/graphql/old_types.rb
View file @
16808abf
...
...
@@ -24,11 +24,12 @@ module RuboCop
MSG_INT
=
'Avoid using GraphQL::INT_TYPE. Use GraphQL::Types::Int instead'
MSG_STRING
=
'Avoid using GraphQL::STRING_TYPE. Use GraphQL::Types::String instead'
MSG_BOOLEAN
=
'Avoid using GraphQL::BOOLEAN_TYPE. Use GraphQL::Types::Boolean instead'
MSG_FLOAT
=
'Avoid using GraphQL::FLOAT_TYPE. Use GraphQL::Types::Float instead'
def_node_matcher
:has_old_type?
,
<<~
PATTERN
(send nil? {:field :argument}
(sym _)
(const
(const nil? :GraphQL) ${:ID_TYPE :INT_TYPE :STRING_TYPE :BOOLEAN
_TYPE})
(const
{(const nil? :GraphQL) (const (cbase) :GraphQL)} ${:ID_TYPE :INT_TYPE :STRING_TYPE :BOOLEAN_TYPE :FLOAT
_TYPE})
(...)?)
PATTERN
...
...
spec/rubocop/cop/graphql/old_types_spec.rb
View file @
16808abf
...
...
@@ -10,10 +10,16 @@ RSpec.describe RuboCop::Cop::Graphql::OldTypes do
subject
(
:cop
)
{
described_class
.
new
}
where
(
:old_type
,
:message
)
do
'GraphQL::ID_TYPE'
|
'Avoid using GraphQL::ID_TYPE. Use GraphQL::Types::ID instead'
'GraphQL::INT_TYPE'
|
'Avoid using GraphQL::INT_TYPE. Use GraphQL::Types::Int instead'
'GraphQL::STRING_TYPE'
|
'Avoid using GraphQL::STRING_TYPE. Use GraphQL::Types::String instead'
'GraphQL::BOOLEAN_TYPE'
|
'Avoid using GraphQL::BOOLEAN_TYPE. Use GraphQL::Types::Boolean instead'
'GraphQL::ID_TYPE'
|
'Avoid using GraphQL::ID_TYPE. Use GraphQL::Types::ID instead'
'GraphQL::INT_TYPE'
|
'Avoid using GraphQL::INT_TYPE. Use GraphQL::Types::Int instead'
'GraphQL::STRING_TYPE'
|
'Avoid using GraphQL::STRING_TYPE. Use GraphQL::Types::String instead'
'GraphQL::BOOLEAN_TYPE'
|
'Avoid using GraphQL::BOOLEAN_TYPE. Use GraphQL::Types::Boolean instead'
'GraphQL::FLOAT_TYPE'
|
'Avoid using GraphQL::FLOAT_TYPE. Use GraphQL::Types::Float instead'
'::GraphQL::ID_TYPE'
|
'Avoid using GraphQL::ID_TYPE. Use GraphQL::Types::ID instead'
'::GraphQL::INT_TYPE'
|
'Avoid using GraphQL::INT_TYPE. Use GraphQL::Types::Int instead'
'::GraphQL::STRING_TYPE'
|
'Avoid using GraphQL::STRING_TYPE. Use GraphQL::Types::String instead'
'::GraphQL::BOOLEAN_TYPE'
|
'Avoid using GraphQL::BOOLEAN_TYPE. Use GraphQL::Types::Boolean instead'
'::GraphQL::FLOAT_TYPE'
|
'Avoid using GraphQL::FLOAT_TYPE. Use GraphQL::Types::Float instead'
end
with_them
do
...
...
@@ -27,7 +33,7 @@ RSpec.describe RuboCop::Cop::Graphql::OldTypes do
RUBY
end
it
"adds an offense when an old type is used with other keywords"
do
it
'adds an offense when an old type is used with other keywords'
do
expect_offense
(
<<~
RUBY
)
class MyType
field :some_field,
#{
old_type
}
, null: true, description: 'My description'
...
...
spec/support/graphql/field_inspection.rb
View file @
16808abf
...
...
@@ -22,7 +22,7 @@ module Graphql
@type
||=
begin
field_type
=
@field
.
type
.
respond_to?
(
:to_graphql
)
?
@field
.
type
.
to_graphql
:
@field
.
type
# The type could be nested. For example `[GraphQL::
STRING_TYPE
]`:
# The type could be nested. For example `[GraphQL::
Types::String
]`:
# - List
# - String!
# - String
...
...
spec/tooling/graphql/docs/renderer_spec.rb
View file @
16808abf
...
...
@@ -438,12 +438,12 @@ RSpec.describe Tooling::Graphql::Docs::Renderer do
mutation
.
description
'Make everything very pretty.'
mutation
.
argument
:prettiness_factor
,
type:
GraphQL
::
FLOAT_TYPE
,
type:
GraphQL
::
Types
::
Float
,
required:
true
,
description:
'How much prettier?'
mutation
.
argument
:pulchritude
,
type:
GraphQL
::
FLOAT_TYPE
,
type:
GraphQL
::
Types
::
Float
,
required:
false
,
description:
'How much prettier?'
,
deprecated:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment