feat(cloudapi-gql): primary_ip Machine resolver

This commit is contained in:
Sérgio Ramos 2017-10-04 18:26:38 +01:00 committed by Sérgio Ramos
parent 8259bfd284
commit e3dbb9086c

View File

@ -106,6 +106,8 @@ const resolvers = {
brand: ({ brand }) => (brand ? brand.toUpperCase() : brand), brand: ({ brand }) => (brand ? brand.toUpperCase() : brand),
state: ({ state }) => (state ? state.toUpperCase() : state), state: ({ state }) => (state ? state.toUpperCase() : state),
image: ({ image }) => resolvers.Query.image(null, { id: image }), image: ({ image }) => resolvers.Query.image(null, { id: image }),
// eslint-disable-next-line camelcase
primary_ip: ({ primaryIp }) => primaryIp,
tags: ({ id }, { name }) => tags: ({ id }, { name }) =>
resolvers.Query.tags(null, { machine: id, name }), resolvers.Query.tags(null, { machine: id, name }),
metadata: ({ id }, { name }) => metadata: ({ id }, { name }) =>