Skip to content

Commit 5f6b268

Browse files
authored
Merge pull request #193 from UoA-eResearch/rc2.5.0
Rc2.5.0
2 parents 4211472 + 70e5b31 commit 5f6b268

File tree

140 files changed

+21894
-6578
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+21894
-6578
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ research-hub-web/cypress/screenshots/
2323
research-hub-web/src/app/graphql/possible-types.ts
2424
research-hub-web/src/app/graphql/schema.ts
2525

26+
research-hub-web/.angular/cache
27+
2628
# Custom environment file - use it in special local development situations
2729
research-hub-web/src/environments/environment.custom.ts
2830

@@ -47,3 +49,6 @@ serverless-now/env/local.env
4749

4850
# ====================== cer-graphql =================== #
4951
cer-graphql/build
52+
53+
# ====================== subhub-link-checker =========== #
54+
subhub-link-checker/build/*

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ A [Serverless Framework](https://www.serverless.com/) ([AWS Lambda](https://aws.
1616
### 4. [terraform/](terraform/)
1717
Terraform infrastructure as code to create the Research Hub AWS infrastructure.
1818

19+
### 4. [subhub-link-checker/](subhub-link-checker/)
20+
A [Contentful App Framework app](https://www.contentful.com/developers/docs/extensibility/app-framework/) that checks to prevent cyclical content references in SubHubs.
1921
## Deployment
2022
CI/CD is achieved via the monorepo's [Jenkinsfile](Jenkinsfile) which is triggered when code is pushed to one of 4 Git branches (`sandbox`, `dev`, `test`, `prod`) corresponding to environments across the three [UoA AWS accounts](http://aws.auckland.ac.nz/) (`sandbox`, `nonprod`, `prod`).
2123

ResearchHubArchitecture.png

374 KB
Loading

cer-graphql/index.ts

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ import fetch from "cross-fetch";
77
import { validateUnauthenticatedQuery } from "./validateUnauthenticatedQuery";
88
import authenticateByJwt, { fetchCognitoPublicKeys } from "./authenticateByJwt";
99
import assertResultsArePublicItems from "./assertResultsArePublicItems";
10-
import { AuthenticationError } from "apollo-server-errors";
11-
import {
12-
ApolloServer,
10+
import { AuthenticationError, ApolloServer } from "apollo-server";
11+
import {
1312
mergeSchemas,
1413
makeRemoteExecutableSchema,
1514
delegateToSchema,
1615
introspectSchema,
17-
} from "apollo-server";
16+
} from "graphql-tools";
1817
import { HttpLink } from "apollo-link-http";
1918
import depthLimit from "graphql-depth-limit";
19+
import { ApolloServerPluginLandingPageGraphQLPlayground, ApolloServerPluginLandingPageProductionDefault } from "apollo-server-core";
2020

2121
// Measure server startup time
2222
var startTime = new Date().getTime();
@@ -206,7 +206,19 @@ export async function createServer (config: CerGraphqlServerConfig) {
206206
return new ApolloServer({
207207
schema,
208208
introspection: true,
209-
playground: enablePlayground,
209+
plugins: [
210+
// Since Apollo 3, the GraphQL Playground environment
211+
// is replaced by a link to Apollo Sandbox, a proprietary cloud-based
212+
// service. They have also provided an option to re-enable GraphQL Playground,
213+
// which is used here.
214+
// GraphQL Playground is being merged with graphiql, though
215+
// seems progress is stalled. (https://github.com/graphql/graphql-playground/issues/1143)
216+
// May need to migrate to graphiql when that is available.
217+
enablePlayground ?
218+
ApolloServerPluginLandingPageGraphQLPlayground() :
219+
ApolloServerPluginLandingPageProductionDefault()
220+
]
221+
,
210222
rootValue: (document: DocumentNode) => {
211223
// This sets the root value for each resolver to be the query document,
212224
// enabling us to have the whole query document in resolvers.

0 commit comments

Comments
 (0)