How to use the graphile-utils.makeChangeNullabilityPlugin function in graphile-utils

To help you get started, we’ve selected a few graphile-utils 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 alex-ald / postgraphile-nest / lib / factories / plugin.factory.ts View on Github external
public static createChangeNullabilityPlugin(
    typeName: string,
    fieldName: string,
    isNullable: boolean,
  ) {
    if (!typeName || !fieldName) {
      throw new Error('typeName and fieldName are required for ChangeNullability');

    typeName = typeName.trim();
    fieldName = fieldName.trim();

    return makeChangeNullabilityPlugin({
      [typeName]: {
        [fieldName]: isNullable,