Skip to content

Commit

Permalink
feat: Introduce Karrio platform GrapQL client
Browse files Browse the repository at this point in the history
  • Loading branch information
danh91 committed Dec 20, 2024
1 parent 69204bc commit 53b4aa9
Show file tree
Hide file tree
Showing 7 changed files with 37,362 additions and 37,324 deletions.
9 changes: 4 additions & 5 deletions apps/dashboard/public/carriers/ups_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 13 additions & 1 deletion apps/dashboard/public/carriers/usps_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions bin/generate-graphql-platform-types
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

npx apollo-codegen generate "ee/platform/packages/console/types/graphql/platform/queries.ts" \
--schema "ee/platform/schemas/graphql-platform.json" \
--target typescript \
--output "ee/platform/packages/console/types/graphql/platform/types.ts"
11 changes: 8 additions & 3 deletions bin/server
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,19 @@ source "bin/activate-env" >/dev/null 2>&1
# Run server commands
if [[ "$*" == *gen:ee* ]]; then
cd "${ROOT:?}"
npx apollo service:download --endpoint=http://0.0.0.0:5002/graphql/ "${ROOT:?}/schemas/graphql-ee.json"
npx apollo service:download --endpoint=http://localhost:5002/graphql/ "${ROOT:?}/schemas/graphql-ee.json"
cd -
elif [[ "$*" == *gen:graph* ]]; then
cd "${ROOT:?}"
npx apollo service:download --endpoint=http://0.0.0.0:5002/graphql/ "${ROOT:?}/schemas/graphql.json"
npx apollo service:download --endpoint=http://localhost:5002/graphql/ "${ROOT:?}/schemas/graphql.json"
cd -
elif [[ "$*" == *gen:admin* ]]; then
cd "${ROOT:?}"
npx apollo service:download --endpoint=http://0.0.0.0:5002/admin/graphql/ "${ROOT:?}/schemas/graphql-admin.json"
npx apollo service:download --endpoint=http://localhost:5002/admin/graphql/ "${ROOT:?}/schemas/graphql-admin.json"
cd -
elif [[ "$*" == *gen:platform* ]]; then
cd "${ROOT:?}"
npx apollo service:download --endpoint=http://0.0.0.0:5002/admin/graphql/ "${ROOT:?}/ee/platform/schemas/graphql-platform.json"
cd -
elif [[ "$*" == *gen:openapi* ]]; then
cd "${ROOT:?}"
Expand Down Expand Up @@ -48,6 +52,7 @@ else
echo "gen:ee - Generate GraphQL ee schema"
echo "gen:graph - Generate GraphQL schema"
echo "gen:admin - Generate Admin GraphQL schema"
echo "gen:platform - Generate Platform GraphQL schema"
echo "gen:openapi - Generate OpenAPI schema"
echo "gen:ts:cli - Generate Typescript fetch client"
echo "build:js - Build Browser Javascript client"
Expand Down
2 changes: 1 addition & 1 deletion ee/platform
Loading

0 comments on commit 53b4aa9

Please sign in to comment.