Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
7e13d6b9b0
10 files changed
+5603
-3984
No files matched your search
@@ -18,3 +18,4 @@ server/package-lock.json
|
||||
server/package-lock.json
|
||||
client/package-lock.json
|
||||
server/package-lock.json
|
||||
client/package-lock.json
|
||||
@@ -32,7 +32,7 @@
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body id="body" onload="loadCanvas()">
|
||||
<body id="body" onload="loadCanvas()" onresize="window.canvasApp.eventHandler.raiseEvent('Browser Resized')">
|
||||
<div id="masterApp"></div>
|
||||
<div id="canvasApp"></div>
|
||||
</body>
|
||||
|
||||
Generated
+5534
-3980
File diff suppressed because it is too large.
Load diff
+2
-1
@@ -22,8 +22,9 @@
|
||||
"homepage": "https://github.com/Algoteers/MasterApp#readme",
|
||||
"devDependencies": {
|
||||
"@advancedalgos/key-vault-client": "^0.0.14",
|
||||
"@advancedalgos/teams-client": "0.0.22",
|
||||
"@advancedalgos/teams-client": "0.0.23",
|
||||
"@advancedalgos/users-client": "^0.0.15",
|
||||
"@advancedalgos/hosts-client": "^0.0.1",
|
||||
"@advancedalgos/web-components": "0.0.13",
|
||||
"@babel/core": "^7.1.2",
|
||||
"autoprefixer": "^9.2.0",
|
||||
|
||||
@@ -15,6 +15,7 @@ import { Header, Footer, Home, Charts, Callback } from './views'
|
||||
|
||||
import Users from '@advancedalgos/users-client'
|
||||
import Teams from '@advancedalgos/teams-client'
|
||||
import Hosts from '@advancedalgos/hosts-client'
|
||||
import KeyVault from '@advancedalgos/key-vault-client'
|
||||
|
||||
export const auth = new Auth(
|
||||
@@ -49,6 +50,10 @@ export const MasterApp = () => (
|
||||
path='/teams'
|
||||
render={props => <Teams {...props} auth={auth} />}
|
||||
/>
|
||||
<Route
|
||||
path='/hosts'
|
||||
render={props => <Hosts {...props} auth={auth} />}
|
||||
/>
|
||||
<Route
|
||||
path='/key-vault'
|
||||
render={props => <KeyVault {...props} auth={auth} />}
|
||||
|
||||
@@ -26,6 +26,7 @@ import AALogo from '../../assets/advanced-algos/aa-logo-dark.svg'
|
||||
const ChartsLink = props => <Link to='/charts' {...props} />
|
||||
const UsersLink = props => <Link to='/users' {...props} />
|
||||
const TeamsLink = props => <Link to='/teams' {...props} />
|
||||
const HostsLink = props => <Link to='/hosts' {...props} />
|
||||
const KeyVaultLink = props => <Link to='/key-vault' {...props} />
|
||||
const HomeLink = props => <Link to='/' {...props} />
|
||||
|
||||
@@ -116,6 +117,9 @@ class Header extends Component {
|
||||
<Button component={TeamsLink} color='inherit'>
|
||||
Teams
|
||||
</Button>
|
||||
<Button component={HostsLink} color='inherit'>
|
||||
Hosts
|
||||
</Button>
|
||||
<Button component={KeyVaultLink} color='inherit'>
|
||||
Key Vault
|
||||
</Button>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
GRAPHQL_API_URL=https://app-api.advancedalgos.net/graphql
|
||||
TEAMS_API_URL=https://teams-api.advancedalgos.net/graphql
|
||||
USERS_API_URL=https://users-api.advancedalgos.net/graphql
|
||||
HOSTS_API_URL=https://hosts-api.advancedalgos.net/graphql
|
||||
KEYVAULT_API_URL=https://keyvault-api.advancedalgos.net/graphql
|
||||
|
||||
AUTH0_DOMAIN=auth0-domain
|
||||
|
||||
+9
-1
@@ -8,7 +8,7 @@ import jwksRsa from 'jwks-rsa'
|
||||
import axios from 'axios'
|
||||
|
||||
import { createTransformedRemoteSchema } from './createRemoteSchema'
|
||||
import { teams } from './links'
|
||||
import { teams, hosts } from './links'
|
||||
import logger from './logger'
|
||||
|
||||
async function getUserId (authId) {
|
||||
@@ -36,6 +36,7 @@ async function getUserId (authId) {
|
||||
async function run () {
|
||||
const transformedTeamsSchema = await createTransformedRemoteSchema('teams_', process.env.TEAMS_API_URL)
|
||||
const transformedUsersSchema = await createTransformedRemoteSchema('users_', process.env.USERS_API_URL)
|
||||
const transformedHostsSchema = await createTransformedRemoteSchema('hosts_', process.env.HOSTS_API_URL)
|
||||
const transformedKeyVaultSchema = await createTransformedRemoteSchema('keyVault_', process.env.KEYVAULT_API_URL)
|
||||
|
||||
var schemas = []
|
||||
@@ -51,6 +52,13 @@ async function run () {
|
||||
if (transformedUsersSchema) {
|
||||
schemas.push(transformedUsersSchema)
|
||||
}
|
||||
if (transformedHostsSchema) {
|
||||
schemas.push(transformedHostsSchema)
|
||||
if (transformedUsersSchema && transformedTeamsSchema) {
|
||||
schemas.push(hosts.linkSchemaDefs)
|
||||
resolvers = Object.assign(resolvers, hosts.resolver(transformedUsersSchema, transformedTeamsSchema))
|
||||
}
|
||||
}
|
||||
if (transformedKeyVaultSchema) {
|
||||
schemas.push(transformedKeyVaultSchema)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
export const linkSchemaDefs =
|
||||
`
|
||||
extend type hosts_Event {
|
||||
host: users_User
|
||||
}
|
||||
extend type hosts_Participant {
|
||||
team: teams_Team
|
||||
}
|
||||
`
|
||||
|
||||
export const resolver = (usersSchema, teamsSchema) => ({
|
||||
hosts_Event: {
|
||||
host: {
|
||||
fragment: `fragment UserFragment on hosts_Event{hostId}`,
|
||||
resolve (parent, args, context, info) {
|
||||
return info.mergeInfo.delegateToSchema({
|
||||
schema: usersSchema,
|
||||
operation: 'query',
|
||||
fieldName: 'users_User',
|
||||
args: { id: parent.hostId },
|
||||
context,
|
||||
info
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
hosts_Participant: {
|
||||
team: {
|
||||
fragment: `fragment TeamFragment on hosts_Participant{teamId}`,
|
||||
resolve (parent, args, context, info) {
|
||||
return info.mergeInfo.delegateToSchema({
|
||||
schema: teamsSchema,
|
||||
operation: 'query',
|
||||
fieldName: 'teams_TeamById',
|
||||
args: { teamId: parent.teamId },
|
||||
context,
|
||||
info
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
export default { resolver, linkSchemaDefs }
|
||||
@@ -1,3 +1,4 @@
|
||||
import teams from './teams'
|
||||
import hosts from './hosts'
|
||||
|
||||
export { teams }
|
||||
export { teams, hosts }
|
||||
Reference in new issue
Block a user