Update api/resolvers/vault.js
This commit is contained in:
parent
ed66cfb3f8
commit
6a23aac6f9
|
@ -141,7 +141,7 @@ export default {
|
||||||
*/
|
*/
|
||||||
function checkOwner (info, ownerType) {
|
function checkOwner (info, ownerType) {
|
||||||
const gqltypeDef = info.schema.getType(ownerType)
|
const gqltypeDef = info.schema.getType(ownerType)
|
||||||
const ownerInterfaces = gqltypeDef?.getInterfaces ? gqltypeDef.getInterfaces() : null
|
const ownerInterfaces = gqltypeDef?.getInterfaces?.()
|
||||||
if (!ownerInterfaces?.some((iface) => iface.name === 'VaultOwner')) {
|
if (!ownerInterfaces?.some((iface) => iface.name === 'VaultOwner')) {
|
||||||
throw new GqlInputError('owner must implement VaultOwner interface but ' + ownerType + ' does not')
|
throw new GqlInputError('owner must implement VaultOwner interface but ' + ownerType + ' does not')
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue