diff options
Diffstat (limited to 'app/assets/javascripts/organizations/groups_and_projects/graphql')
-rw-r--r-- | app/assets/javascripts/organizations/groups_and_projects/graphql/queries/projects.query.graphql | 24 | ||||
-rw-r--r-- | app/assets/javascripts/organizations/groups_and_projects/graphql/resolvers.js | 14 |
2 files changed, 38 insertions, 0 deletions
diff --git a/app/assets/javascripts/organizations/groups_and_projects/graphql/queries/projects.query.graphql b/app/assets/javascripts/organizations/groups_and_projects/graphql/queries/projects.query.graphql new file mode 100644 index 00000000000..b4cb8c607d4 --- /dev/null +++ b/app/assets/javascripts/organizations/groups_and_projects/graphql/queries/projects.query.graphql @@ -0,0 +1,24 @@ +query getOrganizationProjects { + organization @client { + id + projects { + nodes { + id + nameWithNamespace + webUrl + topics + forksCount + avatarUrl + starCount + visibility + openIssuesCount + descriptionHtml + issuesAccessLevel + forkingAccessLevel + accessLevel { + integerValue + } + } + } + } +} diff --git a/app/assets/javascripts/organizations/groups_and_projects/graphql/resolvers.js b/app/assets/javascripts/organizations/groups_and_projects/graphql/resolvers.js new file mode 100644 index 00000000000..794410c2a78 --- /dev/null +++ b/app/assets/javascripts/organizations/groups_and_projects/graphql/resolvers.js @@ -0,0 +1,14 @@ +import { organizationProjects } from 'jest/organizations/groups_and_projects/components/mock_data'; + +export default { + Query: { + organization: async () => { + // Simulate API loading + await new Promise((resolve) => { + setTimeout(resolve, 1000); + }); + + return organizationProjects; + }, + }, +}; |