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
a7b989d8
Commit
a7b989d8
authored
Feb 23, 2022
by
Siddharth Asthana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix GraphQL/OrderedFields offenses
Changelog: other
parent
739c74e6
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
55 additions
and
55 deletions
+55
-55
app/graphql/types/release_asset_link_type.rb
app/graphql/types/release_asset_link_type.rb
+6
-6
app/graphql/types/release_links_type.rb
app/graphql/types/release_links_type.rb
+10
-10
app/graphql/types/release_type.rb
app/graphql/types/release_type.rb
+16
-16
app/graphql/types/repository_type.rb
app/graphql/types/repository_type.rb
+11
-11
app/graphql/types/root_storage_statistics_type.rb
app/graphql/types/root_storage_statistics_type.rb
+6
-6
app/graphql/types/task_completion_status.rb
app/graphql/types/task_completion_status.rb
+2
-2
app/graphql/types/tree/blob_type.rb
app/graphql/types/tree/blob_type.rb
+4
-4
No files found.
app/graphql/types/release_asset_link_type.rb
View file @
a7b989d8
...
...
@@ -7,21 +7,21 @@ module Types
authorize
:read_release
field
:external
,
GraphQL
::
Types
::
Boolean
,
null:
true
,
method: :external?
,
description:
'Indicates the link points to an external resource.'
field
:id
,
GraphQL
::
Types
::
ID
,
null:
false
,
description:
'ID of the link.'
field
:link_type
,
Types
::
ReleaseAssetLinkTypeEnum
,
null:
true
,
description:
'Type of the link: `other`, `runbook`, `image`, `package`; defaults to `other`.'
field
:name
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Name of the link.'
field
:url
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'URL of the link.'
field
:link_type
,
Types
::
ReleaseAssetLinkTypeEnum
,
null:
true
,
description:
'Type of the link: `other`, `runbook`, `image`, `package`; defaults to `other`.'
field
:external
,
GraphQL
::
Types
::
Boolean
,
null:
true
,
method: :external?
,
description:
'Indicates the link points to an external resource.'
field
:direct_asset_url
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Direct asset URL of the link.'
field
:direct_asset_path
,
GraphQL
::
Types
::
String
,
null:
true
,
method: :filepath
,
description:
'Relative path for the direct asset link.'
field
:direct_asset_url
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Direct asset URL of the link.'
def
direct_asset_url
return
object
.
url
unless
object
.
filepath
...
...
app/graphql/types/release_links_type.rb
View file @
a7b989d8
...
...
@@ -10,25 +10,25 @@ module Types
present_using
ReleasePresenter
field
:self_url
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'HTTP URL of the release.'
field
:closed_issues_url
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'HTTP URL of the issues page, filtered by this release and `state=closed`.'
,
authorize: :download_code
field
:closed_merge_requests_url
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'HTTP URL of the merge request page , filtered by this release and `state=closed`.'
,
authorize: :download_code
field
:edit_url
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
"HTTP URL of the release's edit page."
,
authorize: :update_release
field
:opened_merge_requests_url
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'HTTP URL of the merge request page, filtered by this release and `state=open`.'
,
authorize: :download_code
field
:merged_merge_requests_url
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'HTTP URL of the merge request page , filtered by this release and `state=merged`.'
,
authorize: :download_code
field
:closed_merge_requests_url
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'HTTP URL of the merge request page , filtered by this release and `state=closed`.'
,
authorize: :download_code
field
:opened_issues_url
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'HTTP URL of the issues page, filtered by this release and `state=open`.'
,
authorize: :download_code
field
:
closed_issue
s_url
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'HTTP URL of the
issues page, filtered by this release and `state=closed
`.'
,
field
:
opened_merge_request
s_url
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'HTTP URL of the
merge request page, filtered by this release and `state=open
`.'
,
authorize: :download_code
field
:self_url
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'HTTP URL of the release.'
end
end
app/graphql/types/release_type.rb
View file @
a7b989d8
...
...
@@ -13,30 +13,30 @@ module Types
present_using
ReleasePresenter
field
:tag_name
,
GraphQL
::
Types
::
String
,
null:
true
,
method: :tag
,
description:
'Name of the tag associated with the release.'
field
:tag_path
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Relative web path to the tag associated with the release.'
,
authorize: :download_code
field
:assets
,
Types
::
ReleaseAssetsType
,
null:
true
,
method: :itself
,
description:
'Assets of the release.'
field
:created_at
,
Types
::
TimeType
,
null:
true
,
description:
'Timestamp of when the release was created.'
field
:description
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Description (also known as "release notes") of the release.'
field
:evidences
,
Types
::
EvidenceType
.
connection_type
,
null:
true
,
description:
'Evidence for the release.'
field
:links
,
Types
::
ReleaseLinksType
,
null:
true
,
method: :itself
,
description:
'Links of the release.'
field
:milestones
,
Types
::
MilestoneType
.
connection_type
,
null:
true
,
description:
'Milestones associated to the release.'
,
resolver:
::
Resolvers
::
ReleaseMilestonesResolver
field
:name
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Name of the release.'
field
:created_at
,
Types
::
TimeType
,
null:
true
,
description:
'Timestamp of when the release was created.'
field
:released_at
,
Types
::
TimeType
,
null:
true
,
description:
'Timestamp of when the release was released.'
field
:tag_name
,
GraphQL
::
Types
::
String
,
null:
true
,
method: :tag
,
description:
'Name of the tag associated with the release.'
field
:tag_path
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Relative web path to the tag associated with the release.'
,
authorize: :download_code
field
:upcoming_release
,
GraphQL
::
Types
::
Boolean
,
null:
true
,
method: :upcoming_release?
,
description:
'Indicates the release is an upcoming release.'
field
:assets
,
Types
::
ReleaseAssetsType
,
null:
true
,
method: :itself
,
description:
'Assets of the release.'
field
:links
,
Types
::
ReleaseLinksType
,
null:
true
,
method: :itself
,
description:
'Links of the release.'
field
:milestones
,
Types
::
MilestoneType
.
connection_type
,
null:
true
,
description:
'Milestones associated to the release.'
,
resolver:
::
Resolvers
::
ReleaseMilestonesResolver
field
:evidences
,
Types
::
EvidenceType
.
connection_type
,
null:
true
,
description:
'Evidence for the release.'
field
:author
,
Types
::
UserType
,
null:
true
,
description:
'User that created the release.'
...
...
app/graphql/types/repository_type.rb
View file @
a7b989d8
...
...
@@ -6,17 +6,6 @@ module Types
authorize
:download_code
field
:root_ref
,
GraphQL
::
Types
::
String
,
null:
true
,
calls_gitaly:
true
,
description:
'Default branch of the repository.'
field
:empty
,
GraphQL
::
Types
::
Boolean
,
null:
false
,
method: :empty?
,
calls_gitaly:
true
,
description:
'Indicates repository has no visible content.'
field
:exists
,
GraphQL
::
Types
::
Boolean
,
null:
false
,
method: :exists?
,
calls_gitaly:
true
,
description:
'Indicates a corresponding Git repository exists on disk.'
field
:tree
,
Types
::
Tree
::
TreeType
,
null:
true
,
resolver:
Resolvers
::
TreeResolver
,
calls_gitaly:
true
,
description:
'Tree of the repository.'
field
:paginated_tree
,
Types
::
Tree
::
TreeType
.
connection_type
,
null:
true
,
resolver:
Resolvers
::
PaginatedTreeResolver
,
calls_gitaly:
true
,
max_page_size:
100
,
description:
'Paginated tree of the repository.'
field
:blobs
,
Types
::
Repository
::
BlobType
.
connection_type
,
null:
true
,
resolver:
Resolvers
::
BlobsResolver
,
calls_gitaly:
true
,
description:
'Blobs contained within the repository'
field
:branch_names
,
[
GraphQL
::
Types
::
String
],
null:
true
,
calls_gitaly:
true
,
...
...
@@ -26,5 +15,16 @@ module Types
description:
'Shows a disk path of the repository.'
,
null:
true
,
authorize: :read_storage_disk_path
field
:empty
,
GraphQL
::
Types
::
Boolean
,
null:
false
,
method: :empty?
,
calls_gitaly:
true
,
description:
'Indicates repository has no visible content.'
field
:exists
,
GraphQL
::
Types
::
Boolean
,
null:
false
,
method: :exists?
,
calls_gitaly:
true
,
description:
'Indicates a corresponding Git repository exists on disk.'
field
:paginated_tree
,
Types
::
Tree
::
TreeType
.
connection_type
,
null:
true
,
resolver:
Resolvers
::
PaginatedTreeResolver
,
calls_gitaly:
true
,
max_page_size:
100
,
description:
'Paginated tree of the repository.'
field
:root_ref
,
GraphQL
::
Types
::
String
,
null:
true
,
calls_gitaly:
true
,
description:
'Default branch of the repository.'
field
:tree
,
Types
::
Tree
::
TreeType
,
null:
true
,
resolver:
Resolvers
::
TreeResolver
,
calls_gitaly:
true
,
description:
'Tree of the repository.'
end
end
app/graphql/types/root_storage_statistics_type.rb
View file @
a7b989d8
...
...
@@ -6,15 +6,15 @@ module Types
authorize
:read_statistics
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
:dependency_proxy_size
,
GraphQL
::
Types
::
Float
,
null:
false
,
description:
'Dependency Proxy sizes in bytes.'
field
:lfs_objects_size
,
GraphQL
::
Types
::
Float
,
null:
false
,
description:
'LFS objects 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
:repository_size
,
GraphQL
::
Types
::
Float
,
null:
false
,
description:
'Git repository size in bytes.'
field
:snippets_size
,
GraphQL
::
Types
::
Float
,
null:
false
,
description:
'Snippets size in bytes.'
field
:storage_size
,
GraphQL
::
Types
::
Float
,
null:
false
,
description:
'Total storage in bytes.'
field
:uploads_size
,
GraphQL
::
Types
::
Float
,
null:
false
,
description:
'Uploads size in bytes.'
field
:
dependency_proxy_size
,
GraphQL
::
Types
::
Float
,
null:
false
,
description:
'Dependency Proxy sizes
in bytes.'
field
:
wiki_size
,
GraphQL
::
Types
::
Float
,
null:
false
,
description:
'Wiki size
in bytes.'
end
end
app/graphql/types/task_completion_status.rb
View file @
a7b989d8
...
...
@@ -8,10 +8,10 @@ module Types
graphql_name
'TaskCompletionStatus'
description
'Completion status of tasks'
field
:count
,
GraphQL
::
Types
::
Int
,
null:
false
,
description:
'Number of total tasks.'
field
:completed_count
,
GraphQL
::
Types
::
Int
,
null:
false
,
description:
'Number of completed tasks.'
field
:count
,
GraphQL
::
Types
::
Int
,
null:
false
,
description:
'Number of total tasks.'
end
# rubocop: enable Graphql/AuthorizeTypes
end
app/graphql/types/tree/blob_type.rb
View file @
a7b989d8
...
...
@@ -9,15 +9,15 @@ module Types
implements
Types
::
Tree
::
EntryType
present_using
BlobPresenter
field
:web_url
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Web URL of the blob.'
field
:web_path
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Web path of the blob.'
field
:lfs_oid
,
GraphQL
::
Types
::
String
,
null:
true
,
calls_gitaly:
true
,
description:
'LFS ID of the blob.'
field
:mode
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Blob mode in numeric format.'
field
:web_path
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Web path of the blob.'
field
:web_url
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Web URL of the blob.'
def
lfs_oid
Gitlab
::
Graphql
::
Loaders
::
BatchLfsOidLoader
.
new
(
object
.
repository
,
object
.
id
).
find
...
...
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