Error using interfaces
const paginate = <Type>(data: Type[]): Paged<Type> => ({
nodes: data,
page: {
limit: data.length,
offset: 0,
},
})
const anyService = ({
create: async () => null,
update: async () => null,
remove: async () => null,
findOne: async () => null,
findMany: async () => paginate([]),
})
const interfaceService = ({
findOne: async () => null,
findMany: async () => paginate([]),
})
export const builder = createSchemaBuilder()
const touchpoint = builder.model('Touchpoint', wrapModel(Touchpoints))
touchpoint.attr('name', GraphQLString)
const user = builder.interface('User', interfaceService)
user.attr('email', GraphQLString)
const apiKeys = builder.model('ApiKey')
apiKeys.attr('publicKey', GraphQLString)
apiKeys.attr('privateKey', GraphQLString)
const developer = builder.model('Developer', anyService).interface('User')
developer.attr('apiKeys', apiKeys)