How to use the feathers-hooks-common.serialize function in feathers-hooks-common

To help you get started, we’ve selected a few feathers-hooks-common examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github feathers-plus / generator-feathers-plus / test-expands / ts-cumulative-1-nedb.test-expected / src1 / services / nedb-2 / nedb-2.populate.ts View on Github external
}

  // Populate the data.
  let newContext: any = await fgraphql({
    parse,
    runTime,
    schema,
    resolvers,
    recordType: 'Nedb2',
    query,
    options,
  })(context);

  // Prune and sanitize the data.
  if (serializer) {
    newContext = serialize(serializer)(newContext);
  }

  // End the hook.
  return newContext;
  // !end
}
github feathers-plus / generator-feathers-plus / test-expands / a-gens / ts / test-hook-unit.test-expected / src1 / services / nedb-1 / nedb-1.populate.ts View on Github external
}

  // Populate the data.
  let newContext: any = await fgraphql({
    parse,
    runTime,
    schema,
    resolvers,
    recordType: 'Nedb1',
    query,
    options,
  })(context);

  // Prune and sanitize the data.
  if (serializer) {
    newContext = serialize(serializer)(newContext);
  }

  // End the hook.
  return newContext;
  // !end
}
github feathers-plus / generator-feathers-plus / test-expands / cumulative-1-memory.test-expected / src1 / services / nedb-2 / nedb-2.populate.js View on Github external
}

  // Populate the data.
  let newContext = await fgraphql({
    parse,
    runTime,
    schema,
    resolvers,
    recordType: 'Nedb2',
    query,
    options,
  })(context);

  // Prune and sanitize the data.
  if (serializer) {
    newContext = serialize(serializer)(newContext);
  }

  // End the hook.
  return newContext;
  // !end
}
github feathers-plus / generator-feathers-plus / test-expands / cumulative-1-no-semicolons.test-expected / src1 / services / nedb-1 / nedb-1.populate.js View on Github external
}

  // Populate the data.
  let newContext = await fgraphql({
    parse,
    runTime,
    schema,
    resolvers,
    recordType: 'Nedb1',
    query,
    options,
  })(context)

  // Prune and sanitize the data.
  if (serializer) {
    newContext = serialize(serializer)(newContext)
  }

  // End the hook.
  return newContext
  // !end
}
github codingfriend1 / Feathers-Vue / server / services / users / users.hooks.js View on Github external
],
    get: [
      commonHooks.populate({ schema }),
      commonHooks.serialize(serializeSchema),
    ],
    create: [
      sendVerificationEmail(),
      verifyHooks.removeVerification()
    ],
    update: [
      commonHooks.populate({ schema }),
      commonHooks.serialize(serializeSchema),
    ],
    patch: [
      commonHooks.populate({ schema }),
      commonHooks.serialize(serializeSchema),
    ],
    remove: [
      commonHooks.populate({ schema }),
      commonHooks.serialize(serializeSchema),
    ]
  },

  error: {
    all: [],
    find: [],
    get: [],
    create: [],
    update: [],
    patch: [],
    remove: []
  }
github codingfriend1 / Feathers-Vue / src / services / user / hooks / index.js View on Github external
globalHooks.hasPermission('manageUsers')
  ]
};

exports.after = {
  all: [
    hooks.remove('password')
  ],
  find: [
    common.populate({ schema }),
    common.serialize(serializeSchema),
    hooks.remove([ '_computed'])
  ],
  get: [
    common.populate({ schema }),
    common.serialize(serializeSchema),
    hooks.remove([ '_computed'])
  ],
  create: [
    globalHooks.sendVerificationEmail(),
    verifyHooks.removeVerification(),
  ],
  update: [],
  patch: [],
  remove: []
};