zonofthor
10/09/2018, 2:11 PMmutation($scaffoldId: ID!, $key: String!, $value: String!, $includeFragment: Boolean!) {
updateScaffold(scaffoldId: $scaffoldId, key: $key, value: $value) {
id
title
... @include(if: $includeFragment) {
department {
id
title
organisation {
title
}
}
}
}
}nilan
10/09/2018, 2:13 PMzonofthor
10/09/2018, 2:13 PMnilan
10/09/2018, 2:13 PMzonofthor
10/09/2018, 2:14 PMnilan
10/09/2018, 2:14 PMnilan
10/09/2018, 2:14 PMzonofthor
10/09/2018, 2:14 PMzonofthor
10/09/2018, 2:15 PMTypeError: Cannot read property 'name' of undefined
at /home/david/Atom/hamar-api/node_modules/graphql-binding/node_modules/graphql-tools/dist/transforms/ExpandAbstractTypes.js:110:73
at Array.forEach (<anonymous>)
at Object.graphql_1.visit.graphql_1.visitWithTypeInfo._a.(anonymous function) [as SelectionSet] (/home/david/Atom/hamar-api/node_modules/graphql-binding/node_modules/graphql-tools/dist/transforms/ExpandAbstractTypes.js:108:29)
at Object.enter (/home/david/Atom/hamar-api/node_modules/graphql/language/visitor.js:366:25)
at Object.visit (/home/david/Atom/hamar-api/node_modules/graphql/language/visitor.js:254:26)
at expandAbstractTypes (/home/david/Atom/hamar-api/node_modules/graphql-binding/node_modules/graphql-tools/dist/transforms/ExpandAbstractTypes.js:104:22)
at ExpandAbstractTypes.transformRequest (/home/david/Atom/hamar-api/node_modules/graphql-binding/node_modules/graphql-tools/dist/transforms/ExpandAbstractTypes.js:20:24)
at /home/david/Atom/hamar-api/node_modules/graphql-binding/node_modules/graphql-tools/dist/transforms/transforms.js:12:25
at Array.reduce (<anonymous>)
at Object.applyRequestTransforms (/home/david/Atom/hamar-api/node_modules/graphql-binding/node_modules/graphql-tools/dist/transforms/transforms.js:10:23)nilan
10/09/2018, 2:18 PMzonofthor
10/09/2018, 2:18 PMnilan
10/09/2018, 2:19 PMzonofthor
10/09/2018, 2:19 PMnilan
10/09/2018, 2:21 PMnilan
10/09/2018, 2:23 PMzonofthor
10/09/2018, 2:25 PMnilan
10/09/2018, 2:26 PM@include directive:
mutation($scaffoldId: ID!, $key: String!, $value: String!, $includeFragment: Boolean!) {
updateScaffold(scaffoldId: $scaffoldId, key: $key, value: $value) {
id
title
{
department {
id
title
organisation {
title
}
}
}
}
}nilan
10/09/2018, 2:26 PMzonofthor
10/09/2018, 2:28 PMnilan
10/09/2018, 2:28 PMdepartment { ... } is not a fragment.nilan
10/09/2018, 2:29 PMzonofthor
10/09/2018, 2:31 PMzonofthor
10/09/2018, 2:31 PMzonofthor
10/09/2018, 2:33 PMnilan
10/09/2018, 2:35 PM