How to use the @keystonejs/fields.Relationship.adapters function in @keystonejs/fields

To help you get started, we’ve selected a few @keystonejs/fields 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 keystonejs / keystone / packages / field-content / src / Implementation.js View on Github external
blocks: unique(flatMap(this.blocks, block => block.getAdminViews())),
    };
  }

  getGqlAuxTypes({ schemaName }) {
    return [...super.getGqlAuxTypes({ schemaName }), ...this.auxList.getGqlTypes({ schemaName })];
  }

  gqlAuxFieldResolvers({ schemaName }) {
    return this.auxList.gqlFieldResolvers({ schemaName });
  }
}

export class MongoContentInterface extends Relationship.adapters.mongoose {}

export class KnexContentInterface extends Relationship.adapters.knex {}
github keystonejs / keystone / packages / field-content / src / Implementation.js View on Github external
return {
      ...views,
      blocks: unique(flatMap(this.blocks, block => block.getAdminViews())),
    };
  }

  getGqlAuxTypes({ schemaName }) {
    return [...super.getGqlAuxTypes({ schemaName }), ...this.auxList.getGqlTypes({ schemaName })];
  }

  gqlAuxFieldResolvers({ schemaName }) {
    return this.auxList.gqlFieldResolvers({ schemaName });
  }
}

export class MongoContentInterface extends Relationship.adapters.mongoose {}

export class KnexContentInterface extends Relationship.adapters.knex {}

@keystonejs/fields

KeystoneJS Field Types including Text, Password, DateTime, Integer, and more.

MIT
Latest version published 4 years ago

Package Health Score

54 / 100
Full package analysis

Similar packages