Skip to content

Commit

Permalink
Update Schema link container (#433)
Browse files Browse the repository at this point in the history
* Update Schema link container

* now using latest sdk 1.2.0
  • Loading branch information
Stafeeva authored and julienmachon committed Dec 11, 2019
1 parent 72535a3 commit 2f89916
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"build:storybook": "build-storybook"
},
"dependencies": {
"@bbp/nexus-sdk": "^1.1.8",
"@bbp/react-nexus": "^1.1.8",
"@bbp/nexus-sdk": "^1.2.0",
"@bbp/react-nexus": "^1.2.0",
"@sentry/browser": "5.9.1",
"@types/cytoscape": "^3.8.5",
"antd": "^3.19.5",
Expand Down
14 changes: 8 additions & 6 deletions src/shared/containers/SchemaLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ const SchemaLinkContainer: React.FunctionComponent<{
})
.then(({ [EXPANDED_CONSTRAINED_BY_KEY]: constrainedBy }) => {
schemaId = constrainedBy['@id'];
const baseUri = nexus.context.uri;
// Fetch the resource with all resolvers to see if it exists as resolvable inside nexus
return nexus.httpGet({
path: `${baseUri}/resolvers/${orgLabel}/${projectLabel}/_/${encodeURIComponent(

return nexus.Resolver.getResource(
orgLabel,
projectLabel,
'_',
encodeURIComponent(
schemaId
)}`,
});
),
)
})
.then((resource: Resource) => {
const { orgLabel, projectLabel } = getResourceLabelsAndIdsFromSelf(
Expand Down
22 changes: 11 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -844,23 +844,23 @@
version "1.0.0"
resolved "https://registry.yarnpkg.com/@base2/pretty-print-object/-/pretty-print-object-1.0.0.tgz#860ce718b0b73f4009e153541faff2cb6b85d047"

"@bbp/nexus-link@^1.1.8":
version "1.1.8"
resolved "https://registry.yarnpkg.com/@bbp/nexus-link/-/nexus-link-1.1.8.tgz#805f434b2198b9cad0021e274854f022a2d451f0"
"@bbp/nexus-link@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@bbp/nexus-link/-/nexus-link-1.2.0.tgz#759be2a55ed6c3cbdf275fb6001ebb852d2eac10"
dependencies:
rxjs "^6.5.2"

"@bbp/nexus-sdk@^1.1.8":
version "1.1.8"
resolved "https://registry.yarnpkg.com/@bbp/nexus-sdk/-/nexus-sdk-1.1.8.tgz#780a82e4807e05eb261d677cb54ace6607e632d2"
"@bbp/nexus-sdk@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@bbp/nexus-sdk/-/nexus-sdk-1.2.0.tgz#3d614355bb78aa522aede36d1388ad07eddddd92"
dependencies:
"@bbp/nexus-link" "^1.1.8"
"@bbp/nexus-link" "^1.2.0"

"@bbp/react-nexus@^1.1.8":
version "1.1.8"
resolved "https://registry.yarnpkg.com/@bbp/react-nexus/-/react-nexus-1.1.8.tgz#a0581cc01fbbb81682f99976d11483509451ae4a"
"@bbp/react-nexus@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@bbp/react-nexus/-/react-nexus-1.2.0.tgz#31ac4bdf8b8c29f6b93ad28c2030e0b04c1c2a57"
dependencies:
"@bbp/nexus-link" "^1.1.8"
"@bbp/nexus-link" "^1.2.0"
ts-invariant "0.4.1"

"@cnakazawa/watch@^1.0.3":
Expand Down

0 comments on commit 2f89916

Please sign in to comment.