Skip to content
Snippets Groups Projects
Verified Commit d449625e authored by Chad Woolley's avatar Chad Woolley :one: Committed by GitLab
Browse files

Merge branch...

Merge branch '443619-refactor-create-fragment-to-encapsulate-common-part-of-workspaces-query' into 'master' 

[Refactor] Create Fragment to encapsulate Workspaces fields

See merge request !146072



Merged-by: Chad Woolley's avatarChad Woolley <cwoolley@gitlab.com>
Approved-by: Paul Slaughter's avatarPaul Slaughter <pslaughter@gitlab.com>
parents 26d6ad5a 1b936f12
No related branches found
No related tags found
No related merge requests found
Pipeline #1238714126 failed
Pipeline: E2E Omnibus GitLab EE

#1238844745

    Pipeline: GitLab

    #1238740969

      Pipeline: E2E GDK

      #1238737994

        +2
        fragment WorkspaceItem on Workspace {
        id
        name
        namespace
        projectId
        desiredState
        actualState
        url
        devfileRef
        devfilePath
        devfileWebUrl
        createdAt
        }
        #import "../fragments/workspace_item.fragment.graphql"
        mutation workspaceCreate($input: WorkspaceCreateInput!) {
        workspaceCreate(input: $input) {
        workspace {
        id
        name
        namespace
        projectId
        desiredState
        actualState
        url
        devfileRef
        devfilePath
        devfileWebUrl
        createdAt
        ...WorkspaceItem
        }
        errors
        }
        ......
        #import "~/graphql_shared/fragments/page_info.fragment.graphql"
        #import "../fragments/workspace_item.fragment.graphql"
        query agentWorkspaces(
        $first: Int
        ......@@ -13,17 +14,7 @@ query agentWorkspaces(
        id
        workspaces(first: $first, before: $before, after: $after) {
        nodes {
        id
        name
        namespace
        projectId
        desiredState
        actualState
        url
        devfileRef
        devfilePath
        devfileWebUrl
        createdAt
        ...WorkspaceItem
        }
        pageInfo {
        ...PageInfo
        ......
        #import "~/graphql_shared/fragments/page_info.fragment.graphql"
        #import "../fragments/workspace_item.fragment.graphql"
        query userWorkspacesList(
        $first: Int
        ......@@ -17,17 +18,7 @@ query userWorkspacesList(
        projectIds: $projectIds
        ) {
        nodes {
        id
        name
        namespace
        projectId
        desiredState
        actualState
        url
        devfileRef
        devfilePath
        devfileWebUrl
        createdAt
        ...WorkspaceItem
        }
        pageInfo {
        ...PageInfo
        ......
        ......@@ -3,6 +3,7 @@ import { TEST_HOST } from 'helpers/test_constants';
        import { WORKSPACE_DESIRED_STATES, WORKSPACE_STATES } from 'ee/remote_development/constants';
        export const WORKSPACE = {
        __typename: 'Workspace',
        id: 1,
        name: 'Workspace 1',
        namespace: 'Namespace',
        ......@@ -32,6 +33,7 @@ export const USER_WORKSPACES_LIST_QUERY_RESULT = {
        workspaces: {
        nodes: [
        {
        __typename: 'Workspace',
        id: 'gid://gitlab/RemoteDevelopment::Workspace/2',
        name: 'workspace-1-1-idmi02',
        namespace: 'gl-rd-ns-1-1-idmi02',
        ......@@ -45,6 +47,7 @@ export const USER_WORKSPACES_LIST_QUERY_RESULT = {
        createdAt: '2023-04-29T18:24:34Z',
        },
        {
        __typename: 'Workspace',
        id: 'gid://gitlab/RemoteDevelopment::Workspace/1',
        name: 'workspace-1-1-rfu27q',
        namespace: 'gl-rd-ns-1-1-rfu27q',
        ......@@ -95,6 +98,7 @@ export const AGENT_WORKSPACES_LIST_QUERY_RESULT = {
        workspaces: {
        nodes: [
        {
        __typename: 'Workspace',
        id: 'gid://gitlab/RemoteDevelopment::Workspace/2',
        name: 'workspace-1-1-idmi02',
        namespace: 'gl-rd-ns-1-1-idmi02',
        ......@@ -109,6 +113,7 @@ export const AGENT_WORKSPACES_LIST_QUERY_RESULT = {
        createdAt: '2023-04-29T18:24:34Z',
        },
        {
        __typename: 'Workspace',
        id: 'gid://gitlab/RemoteDevelopment::Workspace/1',
        name: 'workspace-1-1-rfu27q',
        namespace: 'gl-rd-ns-1-1-rfu27q',
        ......@@ -307,6 +312,7 @@ export const WORKSPACE_UPDATE_MUTATION_RESULT = {
        workspaceUpdate: {
        errors: [],
        workspace: {
        __typename: 'Workspace',
        id: WORKSPACE.id,
        actualState: WORKSPACE_STATES.running,
        desiredState: WORKSPACE_DESIRED_STATES.restartRequested,
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Finish editing this message first!
        Please register or to comment