diff --git a/hub-js/graphql/local/schema.graphql b/hub-js/graphql/local/schema.graphql index db6c754db..6892ede2b 100644 --- a/hub-js/graphql/local/schema.graphql +++ b/hub-js/graphql/local/schema.graphql @@ -123,7 +123,7 @@ type TypeInstanceResourceVersionSpec { abstract: backendRef.abstract, fetchInput: { typeInstance: { resourceVersion: rev.resourceVersion, id: ti.id }, - backend: { context: backendCtx.context, id: backendRef.id} + backend: { context: apoc.convert.fromJsonMap(backendCtx.context), id: backendRef.id} } } AS value RETURN value diff --git a/hub-js/src/local/resolver/mutation/delete-type-instance.ts b/hub-js/src/local/resolver/mutation/delete-type-instance.ts index 7cec7e530..7158947af 100644 --- a/hub-js/src/local/resolver/mutation/delete-type-instance.ts +++ b/hub-js/src/local/resolver/mutation/delete-type-instance.ts @@ -58,7 +58,7 @@ export async function deleteTypeInstance( // NOTE: Need to be preserved with 'WITH' statement, otherwise we won't be able // to access node's properties after 'DETACH DELETE' statement. - WITH *, {id: ti.id, backend: { id: backendRef.id, context: specBackend.context, abstract: backendRef.abstract}} as out + WITH *, {id: ti.id, backend: { id: backendRef.id, context: apoc.convert.fromJsonMap(specBackend.context), abstract: backendRef.abstract}} as out DETACH DELETE ti, metadata, spec, tirs, specBackend WITH * diff --git a/hub-js/src/local/resolver/mutation/lock-type-instances.ts b/hub-js/src/local/resolver/mutation/lock-type-instances.ts index fbddc8b6c..37d318635 100644 --- a/hub-js/src/local/resolver/mutation/lock-type-instances.ts +++ b/hub-js/src/local/resolver/mutation/lock-type-instances.ts @@ -180,7 +180,7 @@ export async function getTypeInstanceStoredExternally( WITH { typeInstanceId: ti.id, - backend: { context: backendCtx.context, id: backendRef.id, abstract: backendRef.abstract} + backend: { context: apoc.convert.fromJsonMap(backendCtx.context), id: backendRef.id, abstract: backendRef.abstract} } AS value RETURN value `,