diff --git a/.eslintrc.yml b/.eslintrc.yml index d268d73e6a618ffa5b853bd9fb79a7e42fc36d4f..22dae35187e2f354799d1c965c7d2a92014583a3 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -174,3 +174,6 @@ overrides: '@graphql-eslint/no-anonymous-operations': error '@graphql-eslint/unique-operation-name': error '@graphql-eslint/require-id-when-available': error + '@graphql-eslint/no-unused-variables': error + '@graphql-eslint/no-unused-fragments': error + '@graphql-eslint/no-duplicate-fields': error diff --git a/app/assets/javascripts/editor/graphql/typedefs.graphql b/app/assets/javascripts/editor/graphql/typedefs.graphql index 2433ebf6c663f7187c623385eeffa65abd638f09..49beae033f1bc92cfd644eda847a28a43cc7c6d0 100644 --- a/app/assets/javascripts/editor/graphql/typedefs.graphql +++ b/app/assets/javascripts/editor/graphql/typedefs.graphql @@ -12,12 +12,22 @@ type Items { nodes: [Item]! } +input ItemInput { + id: ID! + label: String! + icon: String + selected: Boolean + group: Int! + category: String + selectedLabel: String +} + extend type Query { items: Items } extend type Mutation { - updateToolbarItem(id: ID!, propsToUpdate: Item!): LocalErrors + updateToolbarItem(id: ID!, propsToUpdate: ItemInput!): LocalErrors removeToolbarItems(ids: [ID!]): LocalErrors - addToolbarItems(items: [Item]): LocalErrors + addToolbarItems(items: [ItemInput]): LocalErrors } diff --git a/app/assets/javascripts/environments/graphql/queries/environment_app.query.graphql b/app/assets/javascripts/environments/graphql/queries/environment_app.query.graphql index 2c17c42dd6d498549b1db9ba0f34a275d876248c..c3ab9cf7fca5a90fc821d62aae3a7fc23f8962fd 100644 --- a/app/assets/javascripts/environments/graphql/queries/environment_app.query.graphql +++ b/app/assets/javascripts/environments/graphql/queries/environment_app.query.graphql @@ -4,6 +4,5 @@ query getEnvironmentApp($page: Int, $scope: String) { stoppedCount environments reviewApp - stoppedCount } } diff --git a/app/assets/javascripts/graphql_shared/fragments/blobviewer.fragment.graphql b/app/assets/javascripts/graphql_shared/fragments/blobviewer.fragment.graphql deleted file mode 100644 index b202ed12f8029bf6073ea9c9fb25d2d705d6740d..0000000000000000000000000000000000000000 --- a/app/assets/javascripts/graphql_shared/fragments/blobviewer.fragment.graphql +++ /dev/null @@ -1,7 +0,0 @@ -fragment BlobViewer on SnippetBlobViewer { - collapsed - renderError - tooLarge - type - fileType -} diff --git a/app/assets/javascripts/graphql_shared/fragments/iteration.fragment.graphql b/app/assets/javascripts/graphql_shared/fragments/iteration.fragment.graphql deleted file mode 100644 index 78a368089a80e02de8f0bb23d781f803b98d38ce..0000000000000000000000000000000000000000 --- a/app/assets/javascripts/graphql_shared/fragments/iteration.fragment.graphql +++ /dev/null @@ -1,4 +0,0 @@ -fragment Iteration on Iteration { - id - title -} diff --git a/app/assets/javascripts/pipeline_editor/graphql/mutations/client/lint_ci.mutation.graphql b/app/assets/javascripts/pipeline_editor/graphql/mutations/client/lint_ci.mutation.graphql index 5091d63111f6f286a8c348def1c6cfa4bb15b787..2d42ebb6ac376e438c6ade89b41ccc63dfc86aa9 100644 --- a/app/assets/javascripts/pipeline_editor/graphql/mutations/client/lint_ci.mutation.graphql +++ b/app/assets/javascripts/pipeline_editor/graphql/mutations/client/lint_ci.mutation.graphql @@ -13,7 +13,6 @@ mutation lintCI($endpoint: String, $content: String, $dry: Boolean) { only { refs } - afterScript stage tags when diff --git a/app/assets/javascripts/snippets/fragments/snippet_base.fragment.graphql b/app/assets/javascripts/snippets/fragments/snippet_base.fragment.graphql deleted file mode 100644 index d75b4011d1c07c5c767a633e68c8b6aaf28ae012..0000000000000000000000000000000000000000 --- a/app/assets/javascripts/snippets/fragments/snippet_base.fragment.graphql +++ /dev/null @@ -1,35 +0,0 @@ -#import '~/graphql_shared/fragments/blobviewer.fragment.graphql' - -fragment SnippetBase on Snippet { - id - title - description - descriptionHtml - createdAt - updatedAt - visibilityLevel - webUrl - httpUrlToRepo - sshUrlToRepo - blobs { - nodes { - binary - name - path - rawPath - size - externalStorage - renderedAsText - simpleViewer { - ...BlobViewer - } - richViewer { - ...BlobViewer - } - } - } - userPermissions { - adminSnippet - updateSnippet - } -} diff --git a/app/assets/javascripts/work_items/graphql/typedefs.graphql b/app/assets/javascripts/work_items/graphql/typedefs.graphql index 44a2999a72e9ac27c6c8a493729fa72e43e8d027..36ffba8a540e9e3c668e507eccccfdaae28ea25a 100644 --- a/app/assets/javascripts/work_items/graphql/typedefs.graphql +++ b/app/assets/javascripts/work_items/graphql/typedefs.graphql @@ -22,10 +22,25 @@ extend type WorkItem { mockWidgets: [LocalWorkItemWidget] } +input LocalUserInput { + id: ID! + name: String + username: String + webUrl: String + avatarUrl: String +} + +input LocalLabelInput { + id: ID! + title: String! + color: String + description: String +} + input LocalUpdateWorkItemInput { id: WorkItemID! - assignees: [UserCore!] - labels: [Label] + assignees: [LocalUserInput!] + labels: [LocalLabelInput] } type LocalWorkItemPayload { diff --git a/ee/app/assets/javascripts/boards/graphql/board_scope.fragment.graphql b/ee/app/assets/javascripts/boards/graphql/board_scope.fragment.graphql index ae3d5f97509894f4061f95e93a76203a79c2984c..1bbe56426fb01603bd270fce348bc273aab87077 100644 --- a/ee/app/assets/javascripts/boards/graphql/board_scope.fragment.graphql +++ b/ee/app/assets/javascripts/boards/graphql/board_scope.fragment.graphql @@ -1,6 +1,5 @@ #import "~/graphql_shared/fragments/user.fragment.graphql" #import "~/graphql_shared/fragments/label.fragment.graphql" -#import "~/graphql_shared/fragments/iteration.fragment.graphql" fragment BoardScopeFragment on Board { id @@ -20,7 +19,8 @@ fragment BoardScopeFragment on Board { } } iteration { - ...Iteration + id + title } iterationCadence { id