Skip to content

Commit cbaf3cc

Browse files
author
Keith Halsall
committed
Update workshopID to WORKSHOPID
1 parent 0545fca commit cbaf3cc

File tree

7 files changed

+34
-34
lines changed

7 files changed

+34
-34
lines changed

.github/workflows/create_studio_project.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
--header 'content-type: application/json' \
2525
--header 'X-API-Key: ${{ secrets.APOLLO_USER_KEY }}' \
2626
--url 'https://graphql.api.apollographql.com/api/graphql' \
27-
--data '{"query":"mutation Mutation($graphId: ID!, $name: String!, $description: String, $linkedVariants: [String!]) {\n graph(id: $graphId) {\n createPersistedQueryList(name: $name, description: $description, linkedVariants: $linkedVariants) {\n ... on CreatePersistedQueryListResult {\n persistedQueryList {\n id\n createdAt\n }\n }\n }\n }\n}","variables":{"graphId":"${{vars.ACTOR}}-${{vars.workshopID}}${{ env.GEN }}","name":"pq_list","description":"Our PQ List","linkedVariants":["current"]}}' -o pq.json
27+
--data '{"query":"mutation Mutation($graphId: ID!, $name: String!, $description: String, $linkedVariants: [String!]) {\n graph(id: $graphId) {\n createPersistedQueryList(name: $name, description: $description, linkedVariants: $linkedVariants) {\n ... on CreatePersistedQueryListResult {\n persistedQueryList {\n id\n createdAt\n }\n }\n }\n }\n}","variables":{"graphId":"${{vars.ACTOR}}-${{vars.WORKSHOPID}}${{ env.GEN }}","name":"pq_list","description":"Our PQ List","linkedVariants":["current"]}}' -o pq.json
2828
cat pq.json
2929
3030
- name: Set Env
@@ -40,7 +40,7 @@ jobs:
4040

4141
- name: Publish PQ List
4242
run: |
43-
rover persisted-queries publish --graph-id ${{vars.ACTOR}}-${{vars.workshopID}}${{env.GEN}} --list-id ${{env.PQ_ID}} \
43+
rover persisted-queries publish --graph-id ${{vars.ACTOR}}-${{vars.WORKSHOPID}}${{env.GEN}} --list-id ${{env.PQ_ID}} \
4444
--manifest ./final/workshop-pq-manifest.json
4545
4646
deploy:
@@ -58,19 +58,19 @@ jobs:
5858
credentials_json: ${{ secrets.GCP_CREDENTIALS }}
5959
- name: Get URL
6060
run: |
61-
gcloud run services describe ${{vars.ACTOR}}-${{vars.workshopID}}-router --region us-central1 --format 'value(status.url)' > url.json
61+
gcloud run services describe ${{vars.ACTOR}}-${{vars.WORKSHOPID}}-router --region us-central1 --format 'value(status.url)' > url.json
6262
echo "URL=$(cat url.json)" >> $GITHUB_ENV
6363
- name: Set URL
6464
run: |
6565
curl --request POST \
6666
--header 'content-type: application/json' \
6767
--header 'X-API-Key: ${{ secrets.APOLLO_USER_KEY }}' \
6868
--url 'https://graphql.api.apollographql.com/api/graphql' \
69-
--data '{"query":"mutation UpdateURL($name: String!, $graphId: ID!, $url: String) {\n graph(id: $graphId) {\n variant(name: $name) {\n updateURL(url: $url) {\n createdAt\n }\n }\n }\n}","variables":{"name":"current","graphId":"${{vars.ACTOR}}-${{vars.workshopID}}${{ env.GEN }}","url":"${{ env.URL }}"}}'
69+
--data '{"query":"mutation UpdateURL($name: String!, $graphId: ID!, $url: String) {\n graph(id: $graphId) {\n variant(name: $name) {\n updateURL(url: $url) {\n createdAt\n }\n }\n }\n}","variables":{"name":"current","graphId":"${{vars.ACTOR}}-${{vars.WORKSHOPID}}${{ env.GEN }}","url":"${{ env.URL }}"}}'
7070
7171
- name: Get Contract Router URL
7272
run: |
73-
gcloud run services describe ${{vars.ACTOR}}-${{vars.workshopID}}-contractRouter --region us-central1 --format 'value(status.url)' > contractURL.json
73+
gcloud run services describe ${{vars.ACTOR}}-${{vars.WORKSHOPID}}-contractRouter --region us-central1 --format 'value(status.url)' > contractURL.json
7474
echo "contractURL=$(cat contractURL.json)" >> $GITHUB_ENV
7575
7676
- name: Set URL
@@ -79,7 +79,7 @@ jobs:
7979
--header 'content-type: application/json' \
8080
--header 'X-API-Key: ${{ secrets.APOLLO_USER_KEY }}' \
8181
--url 'https://graphql.api.apollographql.com/api/graphql' \
82-
--data '{"query":"mutation UpdateURL($name: String!, $graphId: ID!, $url: String) {\n graph(id: $graphId) {\n variant(name: $name) {\n updateURL(url: $url) {\n createdAt\n }\n }\n }\n}","variables":{"name":"public","graphId":"${{vars.ACTOR}}-${{vars.workshopID}}${{ env.GEN }}","url":"${{ env.URL }}"}}'
82+
--data '{"query":"mutation UpdateURL($name: String!, $graphId: ID!, $url: String) {\n graph(id: $graphId) {\n variant(name: $name) {\n updateURL(url: $url) {\n createdAt\n }\n }\n }\n}","variables":{"name":"public","graphId":"${{vars.ACTOR}}-${{vars.WORKSHOPID}}${{ env.GEN }}","url":"${{ env.URL }}"}}'
8383
8484

8585
- name: Set Subscription URL
@@ -88,7 +88,7 @@ jobs:
8888
--header 'content-type: application/json' \
8989
--header 'X-API-Key: ${{ secrets.APOLLO_USER_KEY }}' \
9090
--url 'https://graphql.api.apollographql.com/api/graphql' \
91-
--data '{"query":"mutation Mutation($graphId: ID!, $name: String!, $subscriptionUrl: String) {\n graph(id: $graphId) {\n variant(name: $name) {\n updateSubscriptionURL(subscriptionUrl: $subscriptionUrl) {\n createdAt\n }\n }\n }\n}","variables":{"graphId":"${{vars.ACTOR}}-${{vars.workshopID}}${{ env.GEN }}","name":"current","subscriptionUrl":"${{ env.URL }}"}}'
91+
--data '{"query":"mutation Mutation($graphId: ID!, $name: String!, $subscriptionUrl: String) {\n graph(id: $graphId) {\n variant(name: $name) {\n updateSubscriptionURL(subscriptionUrl: $subscriptionUrl) {\n createdAt\n }\n }\n }\n}","variables":{"graphId":"${{vars.ACTOR}}-${{vars.WORKSHOPID}}${{ env.GEN }}","name":"current","subscriptionUrl":"${{ env.URL }}"}}'
9292
9393
preflightScript:
9494
needs: publish
@@ -100,4 +100,4 @@ jobs:
100100
--header 'content-type: application/json' \
101101
--header 'X-API-Key: ${{ secrets.APOLLO_USER_KEY }}' \
102102
--url 'https://graphql.api.apollographql.com/api/graphql' \
103-
--data '{"query":"mutation Mutation($graphId: ID!, $name: String!, $preflightScript: String) {\n graph(id: $graphId) {\n variant(name: $name) {\n updatePreflightScript(preflightScript: $preflightScript) {\n createdAt\n }\n }\n }\n}","variables":{"graphId":"${{vars.ACTOR}}-${{vars.workshopID}}${{ env.GEN }}","name":"current","preflightScript":"const API_KEY=\"AIzaSyBGEWuarfRs4vVIzbdPj7EU_h3tMAVO_e4\";console.log(\"fetching new token.....\");const getToken=async e=>{let o=await explorer.fetch(\"https:\/\/identitytoolkit.googleapis.com\/v1\/accounts:signInWithPassword?key=AIzaSyBGEWuarfRs4vVIzbdPj7EU_h3tMAVO_e4\",{method:\"POST\",header:{\"Content-Type\":\"application\/json\"},body:JSON.stringify({email:e,password:\"apolloworkshop\",returnSecureToken:!0})});return o.json()},authorizedCredentials=await getToken(\"[email protected]\"),{idToken:authorizedToken}=authorizedCredentials;explorer.environment.set(\"authorizedToken\",authorizedToken),console.log(\"successfully set authorized token\");const unauthorizedCredentials=await getToken(\"[email protected]\"),{idToken:unauthorizedToken}=unauthorizedCredentials;explorer.environment.set(\"unauthorizedToken\",unauthorizedToken),console.log(\"successfully set token unauthorized token\");"}}'
103+
--data '{"query":"mutation Mutation($graphId: ID!, $name: String!, $preflightScript: String) {\n graph(id: $graphId) {\n variant(name: $name) {\n updatePreflightScript(preflightScript: $preflightScript) {\n createdAt\n }\n }\n }\n}","variables":{"graphId":"${{vars.ACTOR}}-${{vars.WORKSHOPID}}${{ env.GEN }}","name":"current","preflightScript":"const API_KEY=\"AIzaSyBGEWuarfRs4vVIzbdPj7EU_h3tMAVO_e4\";console.log(\"fetching new token.....\");const getToken=async e=>{let o=await explorer.fetch(\"https:\/\/identitytoolkit.googleapis.com\/v1\/accounts:signInWithPassword?key=AIzaSyBGEWuarfRs4vVIzbdPj7EU_h3tMAVO_e4\",{method:\"POST\",header:{\"Content-Type\":\"application\/json\"},body:JSON.stringify({email:e,password:\"apolloworkshop\",returnSecureToken:!0})});return o.json()},authorizedCredentials=await getToken(\"[email protected]\"),{idToken:authorizedToken}=authorizedCredentials;explorer.environment.set(\"authorizedToken\",authorizedToken),console.log(\"successfully set authorized token\");const unauthorizedCredentials=await getToken(\"[email protected]\"),{idToken:unauthorizedToken}=unauthorizedCredentials;explorer.environment.set(\"unauthorizedToken\",unauthorizedToken),console.log(\"successfully set token unauthorized token\");"}}'

.github/workflows/deploy-orders.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,30 +30,30 @@ jobs:
3030
3131
- name: Build Order Subgraph Docker image
3232
run: |
33-
docker build -t gcr.io/summit-enterprise-workshop/${{github.actor}}-${{vars.workshopID}}-orders:latest .
33+
docker build -t gcr.io/summit-enterprise-workshop/${{github.actor}}-${{vars.WORKSHOPID}}-orders:latest .
3434
docker images
3535
working-directory: ./rest-orders
3636

3737
- name: Push Docker image to Google Container Registry
3838
run: |
39-
docker push gcr.io/summit-enterprise-workshop/${{github.actor}}-${{vars.workshopID}}-orders:latest
39+
docker push gcr.io/summit-enterprise-workshop/${{github.actor}}-${{vars.WORKSHOPID}}-orders:latest
4040
working-directory: ./rest-orders
4141

4242
- name: Deploy Orders subgraph to Cloud Run
4343
run: |
44-
gcloud run deploy ${{github.actor}}-${{vars.workshopID}}-orders \
45-
--image gcr.io/summit-enterprise-workshop/${{github.actor}}-${{vars.workshopID}}-orders:latest \
44+
gcloud run deploy ${{github.actor}}-${{vars.WORKSHOPID}}-orders \
45+
--image gcr.io/summit-enterprise-workshop/${{github.actor}}-${{vars.WORKSHOPID}}-orders:latest \
4646
--platform managed \
4747
--region us-central1 \
4848
--update-env-vars APOLLO_KEY=${{ secrets.APOLLO_KEY }},APOLLO_GRAPH_REF=${{ secrets.APOLLO_GRAPH_REF }} \
4949
--allow-unauthenticated
5050
- name: Get URL
5151
run: |
52-
gcloud run services describe ${{vars.ACTOR}}-${{vars.workshopID}}-orders --region us-central1 --format 'value(status.url)' > url.json
52+
gcloud run services describe ${{vars.ACTOR}}-${{vars.WORKSHOPID}}-orders --region us-central1 --format 'value(status.url)' > url.json
5353
echo "URL=$(cat url.json)" >> $GITHUB_ENV
5454
- name: Rover Subgraph Publish Orders
5555
run: |
56-
rover subgraph publish ${{vars.ACTOR}}-${{vars.workshopID}}${{ env.GEN }}@current \
56+
rover subgraph publish ${{vars.ACTOR}}-${{vars.WORKSHOPID}}${{ env.GEN }}@current \
5757
--name orders \
5858
--routing-url ${{ env.URL }} \
5959
--schema ./rest-orders/schema.graphql

.github/workflows/deploy-router.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ jobs:
3232

3333
- name: Depoy Apollo Router to Cloud Run
3434
run: |
35-
gcloud run deploy ${{vars.ACTOR}}-${{vars.workshopID}}-router --image gcr.io/summit-enterprise-workshop/jesse-apollo-router:latest \
35+
gcloud run deploy ${{vars.ACTOR}}-${{vars.WORKSHOPID}}-router --image gcr.io/summit-enterprise-workshop/jesse-apollo-router:latest \
3636
--set-secrets=/dist/config/router.yaml=${{vars.ACTOR}}:latest \
37-
--set-env-vars "APOLLO_ROUTER_HOT_RELOAD=true,APOLLO_KEY=${{ vars.TOKEN }},APOLLO_GRAPH_REF=${{vars.ACTOR}}-${{vars.workshopID}}${{env.GEN}}@current" --platform managed --region us-central1 \
37+
--set-env-vars "APOLLO_ROUTER_HOT_RELOAD=true,APOLLO_KEY=${{ vars.TOKEN }},APOLLO_GRAPH_REF=${{vars.ACTOR}}-${{vars.WORKSHOPID}}${{env.GEN}}@current" --platform managed --region us-central1 \
3838
--allow-unauthenticated
3939
4040
- name: Deploy contract router to Cloud Run
4141
run: |
4242
gcloud run deploy ${{vars.ACTOR}}-contractRouter --image gcr.io/summit-enterprise-workshop/jesse-apollo-router:latest \
4343
--set-secrets=/dist/config/router.yaml=${{vars.ACTOR}}:latest \
44-
--set-env-vars "APOLLO_ROUTER_HOT_RELOAD=true,APOLLO_KEY=${{ vars.TOKEN }},APOLLO_GRAPH_REF=${{vars.ACTOR}}-${{vars.workshopID}}${{env.GEN}}@public" --platform managed --region us-central1 \
44+
--set-env-vars "APOLLO_ROUTER_HOT_RELOAD=true,APOLLO_KEY=${{ vars.TOKEN }},APOLLO_GRAPH_REF=${{vars.ACTOR}}-${{vars.WORKSHOPID}}${{env.GEN}}@public" --platform managed --region us-central1 \
4545
--allow-unauthenticated

.github/workflows/deploy-website.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,31 +29,31 @@ jobs:
2929
3030
- name: Build Website Docker image
3131
run: |
32-
docker build -t gcr.io/summit-enterprise-workshop/${{github.actor}}-${{vars.workshopID}}-website:latest .
32+
docker build -t gcr.io/summit-enterprise-workshop/${{github.actor}}-${{vars.WORKSHOPID}}-website:latest .
3333
docker images
3434
working-directory: .final/website
3535

3636
- name: Push Docker image to Google Container Registry
3737
run: |
38-
docker push gcr.io/summit-enterprise-workshop/${{github.actor}}-${{vars.workshopID}}-website:latest
38+
docker push gcr.io/summit-enterprise-workshop/${{github.actor}}-${{vars.WORKSHOPID}}-website:latest
3939
working-directory: ./final/website
4040

4141
- name: Get Router URL
4242
run: |
43-
gcloud run services describe ${{vars.ACTOR}}-${{vars.workshopID}}-router --region us-central1 --format 'value(status.url)' > url.json
43+
gcloud run services describe ${{vars.ACTOR}}-${{vars.WORKSHOPID}}-router --region us-central1 --format 'value(status.url)' > url.json
4444
echo "URL=$(cat url.json)" >> $GITHUB_ENV
4545
4646
- name: Deploy Website to Cloud Run
4747
run: |
48-
gcloud run deploy ${{github.actor}}-${{vars.workshopID}}-website \
49-
--image gcr.io/summit-enterprise-workshop/${{github.actor}}-${{vars.workshopID}}-website:latest \
48+
gcloud run deploy ${{github.actor}}-${{vars.WORKSHOPID}}-website \
49+
--image gcr.io/summit-enterprise-workshop/${{github.actor}}-${{vars.WORKSHOPID}}-website:latest \
5050
--platform managed \
5151
--region us-central1 \
5252
--update-env-vars APOLLO_KEY=${{ secrets.APOLLO_KEY }},APOLLO_GRAPH_REF=${{ secrets.APOLLO_GRAPH_REF }}, ROUTER_URL=${{env.url}} \
5353
--allow-unauthenticated
5454
- name: Get URL
5555
run: |
56-
gcloud run services describe ${{vars.ACTOR}}-${{vars.workshopID}}-website --region us-central1 --format 'value(status.url)' > url.json
56+
gcloud run services describe ${{vars.ACTOR}}-${{vars.WORKSHOPID}}-website --region us-central1 --format 'value(status.url)' > url.json
5757
echo "webURL=$(cat url.json)" >> $GITHUB_ENV
5858
5959
- name: Get current README to update
@@ -62,7 +62,7 @@ jobs:
6262
--header 'content-type: application/json' \
6363
--header 'X-API-Key: user:fp.d88ba77d-487c-4b97-9780-f1e4c5352a22:ftuXT6T7OktKoMaUZhQwSw' \
6464
--url 'https://graphql.api.apollographql.com/api/graphql' \
65-
--data '{"query":"query Query($ref: ID!) {\n variant(ref: $ref) {\n ... on GraphVariant {\n readme {\n content\n }\n }\n }\n}","variables":{"ref":"${{vars.ACTOR}}-${{vars.workshopID}}${{env.GEN}}"}}' -o readme.json
65+
--data '{"query":"query Query($ref: ID!) {\n variant(ref: $ref) {\n ... on GraphVariant {\n readme {\n content\n }\n }\n }\n}","variables":{"ref":"${{vars.ACTOR}}-${{vars.WORKSHOPID}}${{env.GEN}}"}}' -o readme.json
6666
6767
- name: Set Env
6868
run: echo "CONTENT=$(cat readme.json | jq .data.variant.readme.content)" >> $GITHUB_ENV
@@ -73,4 +73,4 @@ jobs:
7373
--header 'content-type: application/json' \
7474
--header 'X-API-Key: user:fp.d88ba77d-487c-4b97-9780-f1e4c5352a22:ftuXT6T7OktKoMaUZhQwSw' \
7575
--url 'https://graphql.api.apollographql.com/api/graphql' \
76-
--data '{"query":"mutation Mutation($graphId: ID!, $name: String!, $readme: String!) {\n graph(id: $graphId) {\n variant(name: $name) {\n updateVariantReadme(readme: $readme) {\n readme {\n content\n }\n }\n }\n }\n}","variables":{"graphId":"${{vars.ACTOR}}-${{vars.workshopID}}${{env.GEN}}","name":"current","readme":"${{env.CONTENT}} \n###WEBSITE URL \n ${{env.webURL}}"}}'
76+
--data '{"query":"mutation Mutation($graphId: ID!, $name: String!, $readme: String!) {\n graph(id: $graphId) {\n variant(name: $name) {\n updateVariantReadme(readme: $readme) {\n readme {\n content\n }\n }\n }\n }\n}","variables":{"graphId":"${{vars.ACTOR}}-${{vars.WORKSHOPID}}${{env.GEN}}","name":"current","readme":"${{env.CONTENT}} \n###WEBSITE URL \n ${{env.webURL}}"}}'

.github/workflows/publish-subgraph.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,22 @@ jobs:
2323
2424
- name: Rover Subgraph Publish Products
2525
run: |
26-
rover subgraph publish ${{vars.ACTOR}}-${{vars.workshopID}}${{ env.GEN }}@current \
26+
rover subgraph publish ${{vars.ACTOR}}-${{vars.WORKSHOPID}}${{ env.GEN }}@current \
2727
--name products \
2828
--convert \
2929
--routing-url https://subgraph-products-j3nprurqka-ue.a.run.app \
3030
--schema ./final/nosql-products/schema.graphql
3131
3232
- name: Rover Subgraph Publish Orders
3333
run: |
34-
rover subgraph publish ${{vars.ACTOR}}-${{vars.workshopID}}${{ env.GEN }}@current \
34+
rover subgraph publish ${{vars.ACTOR}}-${{vars.WORKSHOPID}}${{ env.GEN }}@current \
3535
--name orders \
3636
--routing-url https://subgraph-orders-j3nprurqka-ue.a.run.app \
3737
--schema ./final/rest-orders/schema.graphql
3838
3939
- name: Rover Subgraph Publish Customers
4040
run: |
41-
rover subgraph publish ${{vars.ACTOR}}-${{vars.workshopID}}${{ env.GEN }}@current \
41+
rover subgraph publish ${{vars.ACTOR}}-${{vars.WORKSHOPID}}${{ env.GEN }}@current \
4242
--name customers \
4343
--routing-url https://subgraph-customers-j3nprurqka-ue.a.run.app \
4444
--schema ./final/sql-customers/schema.graphql

0 commit comments

Comments
 (0)