Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Migrate API calls to GraphQl #101

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/globe_cli/.graphqlrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# .graphqlrc.yml or graphql.config.yml
schema: "lib/src/graphql/**/*.graphql"
documents: "lib/**/*.graphql"
10 changes: 10 additions & 0 deletions packages/globe_cli/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# build.yaml

targets:
$default:
builders:
graphql_codegen:
options:
generatedFileHeader: "// ignore_for_file: type=lint\n"
clients:
- graphql
27 changes: 27 additions & 0 deletions packages/globe_cli/lib/src/commands/project/project.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
mutation Pause($orgSlug: String!, $projectId: String!) {
pauseProject(orgSlug: $orgSlug, projectId: $projectId) {
message
}
}

mutation Resume($orgSlug: String!, $projectId: String!) {
resumeProject(orgSlug: $orgSlug, projectId: $projectId) {
message
}
}

mutation CreateProject($orgSlug: String!, $name: String!) {
createProject(input: { slug: $name, orgSlug: $orgSlug }) {
id
slug
status
}
}

query Projects($orgSlug: String!) {
projects(orgSlug: $orgSlug) {
id
slug
status
}
}
Loading
Loading