Skip to content
Merged
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
8 changes: 1 addition & 7 deletions components/ui/graphql/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import { ApolloServer } from '@apollo/server';
import { expressMiddleware } from '@apollo/server/express4';
import { ApolloServerPluginLandingPageLocalDefault } from '@apollo/server/plugin/landingPage/default';
import { addMocksToSchema } from '@graphql-tools/mock';
import { makeExecutableSchema } from '@graphql-tools/schema';
import express from 'express';
import http from 'http';
Expand Down Expand Up @@ -42,12 +41,7 @@ const httpServer = http.createServer(app);

const schema = makeExecutableSchema({ typeDefs, resolvers });
const server = new ApolloServer<Context>({
schema: process.env.IDIES_ENV === 'test' ? addMocksToSchema(
{
schema,
mocks: { DateTime: () => new Date() }
}
) : schema,
schema,
plugins: process.env.IDIES_ENV !== 'production' ?
[
// eslint-disable-next-line new-cap
Expand Down
3 changes: 3 additions & 0 deletions helm/sciserver/templates/graphql/graphql-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ if (not .Values.graphql.url) -}}

apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -60,3 +62,4 @@ spec:
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
{{ end -}}
4 changes: 3 additions & 1 deletion helm/sciserver/templates/web/web-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ spec:
resources:
{{- toYaml .Values.web.resources | nindent 12 }}
env:
- name: NEXT_PUBLIC_BASE_URL
value: '{{ include "sciserver.url" . }}'
- name: NEXT_PUBLIC_LOGIN_PORTAL_URL
value: '{{ include "sciserver.url" . }}login-portal/'
- name: NEXT_PUBLIC_GRAPHQL_URL
value: '{{ include "sciserver.url" . }}graphql'
value: '{{ if .Values.graphql.url }}{{ .Values.graphql.url }}{{ else }}{{ include "sciserver.url" . }}graphql{{ end }}'
- name: NEXT_PUBLIC_FILES_URL
value: '{{ include "sciserver.url" . }}dashboard/files/uservolumes'
- name: NEXT_PUBLIC_DASHBOARD_URL
Expand Down
1 change: 1 addition & 0 deletions helm/sciserver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ web:
memory: 128Mi

graphql:
# url: '' If URL is set, the graphql deployment will be skipped and the url will be used for the web deployment
replicaCount: 1
env: dev
image:
Expand Down