Skip to main content

Inflection referenceInflection 参考

interface GraphileBuild.Inflection {
_allInterfaceModeUnionRows(codec): string
_allRows(resource): string
_attributeName(details): string
_codecName(codec): string
_functionName(details): string
_joinAttributeNames(codec, names): string
_manyRelation(details): string
_manyRelationRaw(details): string
_resourceName(resource): string
_schemaPrefix(details): string
_singleRelationBackwardsRaw(details): string
_singleRelationRaw(details): string
_singularizedCodecName(codec): string
_singularizedResourceName(resource): string
allInterfaceModeUnionRowsConnection(codec): string
allInterfaceModeUnionRowsList(codec): string
allRowsConnection(resource): string
allRowsList(resource): string
argument(details): string
attribute(details): string
baseInputType(typeName): string
builtin(name): string
camelCase: (text) => string
classCodecName(details): string
coerceToGraphQLName(name): string
computedAttributeConnectionField(details): string
computedAttributeField(details): string
computedAttributeListField(details): string
computedAttributeOrder(details): string
conditionType(typeName): string (+1 overload)
connectionField(baseName): string
connectionType(typeName): string
constantCase: (text) => string
createField(resource): string
createInputType(resource): string
createPayloadType(resource): string
customMutationField(details): string
customMutationInput(details): string
customMutationPayload(details): string
customQueryConnectionField(details): string
customQueryField(details): string
customQueryListField(details): string
deleteByKeysField(details): string
deleteByKeysInputType(details): string
deletedNodeId(details): string
deleteNodeField(details): string
deleteNodeInputType(details): string
deletePayloadType(details): string
dontEndInInputOrPatch(text): string
edgeType(typeName): string
enumTableCodec(details): string
enumTableEnum(details): string
enumType(codec): string
enumValue(value, codec): string
functionMutationResultFieldName(details): string
functionRecordReturnCodecName(details): string
functionResourceName(details): string
inputType(typeName): string
listField(baseName): string
manyRelationConnection(details): string
manyRelationList(details): string
nodeById(typeName): string
nodeIdAttribute(details): string
nodeIdFieldName(): string
orderByAttributeEnum(details): string
orderByType(typeName): string
patchField(fieldName): string
patchType(typeName): string
pgPolymorphismEnumType(pgCodec): string
pgPolymorphismOnlyArgument(pgCodec): string
pluralize: (text) => string
rangeBoundType(input): string
rangeType(input): string
recordFunctionConnectionType(details): string
recordFunctionEdgeType(details): string
refConnection(details): string
refList(details): string
refSingle(details): string
resourceRelationName(details): string
rowByUnique(details): string
scalarCodecTypeName(codec): string
scalarFunctionConnectionType(details): string
scalarFunctionEdgeType(details): string
singleRelation(details): string
singleRelationBackwards(details): string
singularize: (text) => string
tableConnectionType(codec): string
tableEdgeField(codec): string
tableEdgeType(codec): string
tableFieldName(resource): string
tableResourceName(details): string
tableType(codec): string
typeCodecName(details): string
updateByKeysField(details): string
updateByKeysInputType(details): string
updateNodeField(details): string
updateNodeInputType(details): string
updatePayloadType(details): string
upperCamelCase: (text) => string
}

_allInterfaceModeUnionRows_allInterfaceModeUnionRows(Union 接口全量行基础名)​

Added by PgInterfaceModeUnionAllRowsPlugin.

由 PgInterfaceModeUnionAllRowsPlugin 添加。

The base inflector used by allInterfaceModeUnionRowsConnection and allInterfaceModeUnionRowsList.

供 allInterfaceModeUnionRowsConnection 和 allInterfaceModeUnionRowsList 使用的基础 inflector。

_allInterfaceModeUnionRows(codec: PgCodec): string

_allRows_allRows(全量行基础名)​

Added by PgAllRowsPlugin.

由 PgAllRowsPlugin 添加。

The base inflector used by allRowsConnection and allRowsList.

供 allRowsConnection 和 allRowsList 使用的基础 inflector。

_allRows(resource: PgResource<any, any, any, any, any>): string

_attributeName_attributeName(属性基础字段名)​

Added by PgAttributesPlugin.

由 PgAttributesPlugin 添加。

Overridden by:

被以下插件覆盖:

  • PgV4InflectionPlugin

    PgV4InflectionPlugin(V4 命名推导插件)

  • PostGraphileV4CompatibilityPlugin

    PostGraphileV4CompatibilityPlugin(V4 兼容插件)

  • PgRelayPlugin

    PgRelayPlugin(Relay 兼容插件)

Given a attributeName on a PgCodec's attributes, should return the field name to use to represent this attribute (both for input and output).

根据 PgCodec 属性集合中的 attributeName,返回用于表示该属性的字段名称(同时适用于 input 和 output)。

_attributeName(details: {
codec: PgCodecWithAttributes;
attributeName: string;
skipRowId?: boolean;
}): string

_codecName_codecName(Codec 基础名称)​

Added by PgTablesPlugin.

由 PgTablesPlugin 添加。

A PgCodec may represent any of a wide range of PostgreSQL types; this inflector gives a name to this codec, it's primarily used when naming types in the GraphQL schema (as opposed to _sourceName which typically names fields).

一个 PgCodec 可以代表多种 PostgreSQL 类型;该 inflector 用于为该 codec 命名,主要用于命名 GraphQL schema 中的类型(相对地,_sourceName 通常用于命名字段)。

_codecName(codec: PgCodec<any, any, any, any, any, any, any>): string

_functionName_functionName(函数基础名称)​

Added by PgCustomTypeFieldPlugin.

由 PgCustomTypeFieldPlugin 添加。

_functionName(details: GraphileBuild.InflectionCustomFieldProcedureDetails): string

_joinAttributeNames_joinAttributeNames(拼接多属性名)​

Added by PgAttributesPlugin.

由 PgAttributesPlugin 添加。

Takes a codec and the list of attribute names from that codec and turns it into a joined list.

接收一个 codec 及该 codec 的属性名列表,将其拼接为一个组合字符串。

_joinAttributeNames(codec: PgCodecWithAttributes, names: readonly string[]): string

_manyRelation_manyRelation(一对多 relation 基础名)​

Added by PgRelationsPlugin.

由 PgRelationsPlugin 添加。

_manyRelation(details: GraphileBuild.PgRelationsPluginRelationDetails): string

_manyRelationRaw_manyRelationRaw(一对多 relation 原始名)​

Added by PgRelationsPlugin.

由 PgRelationsPlugin 添加。

_manyRelationRaw(details: GraphileBuild.PgRelationsPluginRelationDetails): string

_resourceName_resourceName(Resource 基础名称)​

Added by PgTablesPlugin.

由 PgTablesPlugin 添加。

A PgResource represents a single way of getting a number of values of resource.codec type. It doesn't necessarily represent a table directly (although it can) - e.g. it might be a function that returns records from a table, or it could be a "sub-selection" of a table, e.g. "admin_users" might be "users where admin is true". This inflector gives a name to this resource, it's primarily used when naming fields in the GraphQL schema (as opposed to _codecName which typically names types.

一个 PgResource 代表获取若干 resource.codec 类型值的某种途径。它不一定直接对应某张表(尽管可以)——例如,它可能是返回表记录的函数,也可能是对表的“子集筛选”(如 admin_users 代表“满足 admin 为 true 的用户”)。该 inflector 为此 resource 命名,主要用于命名 GraphQL schema 中的字段(相对地,_codecName 通常用于命名类型)。

_resourceName(resource: PgResource<any, any, any, any, any>): string

_schemaPrefix_schemaPrefix(Schema 标识前缀)​

Added by PgTablesPlugin.

由 PgTablesPlugin 添加。

Overridden by:

被以下插件覆盖:

  • PgV4InflectionPlugin

    PgV4InflectionPlugin(V4 命名推导插件)

When you're using multiple databases and/or schemas, you may want to prefix various type names/field names with an identifier for these DBs/schemas.

当你使用多个数据库和/或 PostgreSQL schema 时,可能需要为各类类型名或字段名添加用于标识这些数据库或 schema 的前缀。

_schemaPrefix(details: {
serviceName: string;
pgNamespace: PgNamespace;
}): string

_singleRelationBackwardsRaw_singleRelationBackwardsRaw(反向单条 relation 原始名)​

Added by PgRelationsPlugin.

由 PgRelationsPlugin 添加。

_singleRelationBackwardsRaw(details: GraphileBuild.PgRelationsPluginRelationDetails): string

_singleRelationRaw_singleRelationRaw(正向单条 relation 原始名)​

Added by PgRelationsPlugin.

由 PgRelationsPlugin 添加。

_singleRelationRaw(details: GraphileBuild.PgRelationsPluginRelationDetails): string

_singularizedCodecName_singularizedCodecName(单数化 Codec 名称)​

Added by PgTablesPlugin.

由 PgTablesPlugin 添加。

Takes a _codecName and singularizes it. This is also a good place to try and avoid potential conflicts, e.g. for a table foo a Foo and FooInput and FooPatch type might be generated. So a foo_input table could potentially cause conflicts. The default inflector would turn foo_input into FooInputRecord.

获取 _codecName 的结果并将其转为单数形式。这里也是规避潜在命名冲突的好地方:例如,对于表 foo,系统可能会生成 Foo、FooInput 和 FooPatch 类型,因此如果还存在一张 foo_input 表就可能引发冲突。默认 inflector 会将 foo_input 转换为 FooInputRecord。

_singularizedCodecName(codec: PgCodec<any, any, any, any, any, any, any>): string

_singularizedResourceName_singularizedResourceName(单数化 Resource 名称)​

Added by PgTablesPlugin.

由 PgTablesPlugin 添加。

Takes a _sourceName and singularizes it.

获取 _sourceName 的结果并将其转为单数形式。

_singularizedResourceName(resource: PgResource<any, any, any, any, any>): string

allInterfaceModeUnionRowsConnectionallInterfaceModeUnionRowsConnection(Union 接口全量行 Connection 字段名)​

Added by PgInterfaceModeUnionAllRowsPlugin.

由 PgInterfaceModeUnionAllRowsPlugin 添加。

The field name for a Cursor Connection field that returns all rows from the given @interface mode:union codec.

返回指定 @interface mode:union codec 全部记录的 cursor Connection 字段名。

allInterfaceModeUnionRowsConnection(codec: PgCodec): string

allInterfaceModeUnionRowsListallInterfaceModeUnionRowsList(Union 接口全量行列表字段名)​

Added by PgInterfaceModeUnionAllRowsPlugin.

由 PgInterfaceModeUnionAllRowsPlugin 添加。

The field name for a List field that returns all rows from the given @interface mode:union codec.

返回指定 @interface mode:union codec 全部记录的列表(List)字段名。

allInterfaceModeUnionRowsList(codec: PgCodec): string

allRowsConnectionallRowsConnection(全量行 Connection 字段名)​

Added by PgAllRowsPlugin.

由 PgAllRowsPlugin 添加。

The field name for a Cursor Connection field that returns all rows from the given resource.

返回指定 resource 全部记录的 cursor Connection 字段名。

allRowsConnection(resource: PgResource<any, any, any, any, any>): string

allRowsListallRowsList(全量行列表字段名)​

Added by PgAllRowsPlugin.

由 PgAllRowsPlugin 添加。

The field name for a List field that returns all rows from the given resource.

返回指定 resource 全部记录的列表(List)字段名。

allRowsList(resource: PgResource<any, any, any, any, any>): string

argumentargument(函数参数名)​

Added by PgCustomTypeFieldPlugin.

由 PgCustomTypeFieldPlugin 添加。

argument(details: GraphileBuild.InflectionCustomFieldArgumentDetails): string

attributeattribute(表属性字段名)​

Added by PgAttributesPlugin.

由 PgAttributesPlugin 添加。

The field name for a given attribute on that pg_class' table type. May also be used in other places (e.g. the Input or Patch type associated with the table).

该 pg_class 对应表类型上指定属性的字段名称;也可能用于其他相关位置(例如该表关联的 Input 或 Patch 类型)。

attribute(details: {
attributeName: string;
codec: PgCodecWithAttributes;
}): string

baseInputTypebaseInputType(基础 Input 类型名)​

Added by PgTablesPlugin.

由 PgTablesPlugin 添加。

baseInputType(typeName: string): string

builtinbuiltin(内置名称)​

Builtin inflector.

内置 inflector。

Built-in names (allows you to override these in the output schema)

内置名称(允许你在输出的 schema 中覆盖这些默认名称)

e.g.:

graphile-build:

graphile-build 内置名称:

  • Query

    Query(根 Query 类型)

  • Mutation

    Mutation(根 Mutation 类型)

  • Subscription

    Subscription(根 Subscription 类型)

  • Node

    Node(Relay 全局节点接口)

  • PageInfo

    PageInfo(分页信息类型)

  • ...

graphile-build-pg:

graphile-build-pg 内置名称:

  • Interval

    Interval(时间间隔标量)

  • BigInt

    BigInt(大整数标量)

  • BigFloat

    BigFloat(高精度浮点标量)

  • BitString

    BitString(位串标量)

  • Point

    Point(几何点类型)

  • Date

    Date(日期标量)

  • Datetime

    Datetime(日期时间标量)

  • Time

    Time(时间标量)

  • JSON

    JSON(JSON 标量)

  • UUID

    UUID(UUID 标量)

  • InternetAddress

    InternetAddress(IP 地址标量)

  • ...

Other plugins may add their own builtins too; try and avoid conflicts!

其他插件也可能会添加各自的内置名称,请注意避免冲突!

builtin(name: string): string

camelCasecamelCase(小驼峰命名转换)​

Builtin inflector.

内置 inflector。

camelCase: (text: string) => string

classCodecNameclassCodecName(pg_class 对应 Codec 名)​

Added by PgCodecsPlugin.

由 PgCodecsPlugin 添加。

classCodecName(details: {
pgClass: PgClass;
serviceName: string;
}): string

coerceToGraphQLNamecoerceToGraphQLName(规范化为合法 GraphQL 名称)​

Builtin inflector.

内置 inflector。

Overridden by:

被以下插件覆盖:

  • TransliterationPlugin

    TransliterationPlugin(字符音译插件)

Try and make something a valid GraphQL 'Name'.

尝试将输入值转换为合法的 GraphQL “Name”。

Name is defined in GraphQL to match this regexp:

GraphQL 规范定义 Name 须匹配以下正则表达式:

/^[_A-Za-z][_0-9A-Za-z]*$/

正则:/^[_A-Za-z][_0-9A-Za-z]*$/

coerceToGraphQLName(name: string): string

computedAttributeConnectionFieldcomputedAttributeConnectionField(计算属性 Connection 字段名)​

Added by PgCustomTypeFieldPlugin.

由 PgCustomTypeFieldPlugin 添加。

computedAttributeConnectionField(details: GraphileBuild.InflectionCustomFieldProcedureDetails): string

computedAttributeFieldcomputedAttributeField(计算属性字段名)​

Added by PgCustomTypeFieldPlugin.

由 PgCustomTypeFieldPlugin 添加。

computedAttributeField(details: GraphileBuild.InflectionCustomFieldProcedureDetails): string

computedAttributeListFieldcomputedAttributeListField(计算属性列表字段名)​

Added by PgCustomTypeFieldPlugin.

由 PgCustomTypeFieldPlugin 添加。

computedAttributeListField(details: GraphileBuild.InflectionCustomFieldProcedureDetails): string

computedAttributeOrdercomputedAttributeOrder(计算属性排序枚举值)​

Added by PgOrderCustomFieldsPlugin.

由 PgOrderCustomFieldsPlugin 添加。

computedAttributeOrder(details: {
resource: PgResource<any, any, any, readonly PgResourceParameter[], any>;
variant: "asc" | "desc" | "asc_nulls_last" | "desc_nulls_last";
}): string

conditionTypeconditionType(条件过滤 Input 类型名)​

Added by PgConditionArgumentPlugin.

由 PgConditionArgumentPlugin 添加。

Declared in:

声明位置:

conditionType(typeName: string): string (+1 overload)

connectionFieldconnectionField(Connection 字段名)​

Builtin inflector.

内置 inflector。

The name of a field that returns a connection

返回 Connection 的字段名称。

connectionField(baseName: string): string

connectionTypeconnectionType(Connection 类型名)​

Builtin inflector.

内置 inflector。

Take a type name and return the connection type name

接收一个类型名,返回对应的 Connection 类型名。

connectionType(typeName: string): string

constantCaseconstantCase(全大写下划线命名转换)​

Builtin inflector.

内置 inflector。

constantCase: (text: string) => string

createFieldcreateField(新增 Mutation 字段名)​

Added by PgMutationCreatePlugin.

由 PgMutationCreatePlugin 添加。

createField(resource: PgResource<any, any, any, any, any>): string

createInputTypecreateInputType(新增 Input 类型名)​

Added by PgMutationCreatePlugin.

由 PgMutationCreatePlugin 添加。

createInputType(resource: PgResource<any, any, any, any, any>): string

createPayloadTypecreatePayloadType(新增 Payload 类型名)​

Added by PgMutationCreatePlugin.

由 PgMutationCreatePlugin 添加。

createPayloadType(resource: PgResource<any, any, any, any, any>): string

customMutationFieldcustomMutationField(自定义 Mutation 字段名)​

Added by PgCustomTypeFieldPlugin.

由 PgCustomTypeFieldPlugin 添加。

customMutationField(details: GraphileBuild.InflectionCustomFieldProcedureDetails): string

customMutationInputcustomMutationInput(自定义 Mutation Input 类型名)​

Added by PgCustomTypeFieldPlugin.

由 PgCustomTypeFieldPlugin 添加。

customMutationInput(details: GraphileBuild.InflectionCustomFieldProcedureDetails): string

customMutationPayloadcustomMutationPayload(自定义 Mutation Payload 类型名)​

Added by PgCustomTypeFieldPlugin.

由 PgCustomTypeFieldPlugin 添加。

customMutationPayload(details: GraphileBuild.InflectionCustomFieldProcedureDetails): string

customQueryConnectionFieldcustomQueryConnectionField(自定义查询 Connection 字段名)​

Added by PgCustomTypeFieldPlugin.

由 PgCustomTypeFieldPlugin 添加。

customQueryConnectionField(details: GraphileBuild.InflectionCustomFieldProcedureDetails): string

customQueryFieldcustomQueryField(自定义查询字段名)​

Added by PgCustomTypeFieldPlugin.

由 PgCustomTypeFieldPlugin 添加。

customQueryField(details: GraphileBuild.InflectionCustomFieldProcedureDetails): string

customQueryListFieldcustomQueryListField(自定义查询列表字段名)​

Added by PgCustomTypeFieldPlugin.

由 PgCustomTypeFieldPlugin 添加。

customQueryListField(details: GraphileBuild.InflectionCustomFieldProcedureDetails): string

deleteByKeysFielddeleteByKeysField(按唯一键删除 Mutation 字段名)​

Added by PgMutationUpdateDeletePlugin.

由 PgMutationUpdateDeletePlugin 添加。

deleteByKeysField(details: {
resource: PgResource<any, any, any, any, any>;
unique: PgResourceUnique;
}): string

deleteByKeysInputTypedeleteByKeysInputType(按唯一键删除 Input 类型名)​

Added by PgMutationUpdateDeletePlugin.

由 PgMutationUpdateDeletePlugin 添加。

deleteByKeysInputType(details: {
resource: PgResource<any, any, any, any, any>;
unique: PgResourceUnique;
}): string

deleteNodeFielddeleteNodeField(按 Node ID 删除 Mutation 字段名)​

Added by PgMutationUpdateDeletePlugin.

由 PgMutationUpdateDeletePlugin 添加。

deleteNodeField(details: {
resource: PgResource<any, any, any, any, any>;
unique: PgResourceUnique;
}): string

deleteNodeInputTypedeleteNodeInputType(按 Node ID 删除 Input 类型名)​

Added by PgMutationUpdateDeletePlugin.

由 PgMutationUpdateDeletePlugin 添加。

deleteNodeInputType(details: {
resource: PgResource<any, any, any, any, any>;
unique: PgResourceUnique;
}): string

deletePayloadTypedeletePayloadType(删除 Payload 类型名)​

Added by PgMutationUpdateDeletePlugin.

由 PgMutationUpdateDeletePlugin 添加。

deletePayloadType(details: {
resource: PgResource<any, any, any, any, any>;
}): string

deletedNodeIddeletedNodeId(已删除节点 ID 字段名)​

Added by PgMutationUpdateDeletePlugin.

由 PgMutationUpdateDeletePlugin 添加。

Overridden by:

被以下插件覆盖:

  • PgV4InflectionPlugin

    PgV4InflectionPlugin(V4 命名推导插件)

deletedNodeId(details: {
resource: PgResource<any, any, any, any, any>;
}): string

dontEndInInputOrPatchdontEndInInputOrPatch(避免名称以 Input 或 Patch 结尾)​

Added by PgTablesPlugin.

由 PgTablesPlugin 添加。

Appends '_record' to a name that ends in _input, _patch, Input or Patch to avoid naming conflicts.

为以 _input、_patch、Input 或 Patch 结尾的名称追加 _record 后缀,以避免命名冲突。

dontEndInInputOrPatch(text: string): string

edgeTypeedgeType(Edge 类型名)​

Builtin inflector.

内置 inflector。

Take a type name and return the edge type name

接收一个类型名,返回对应的 Edge 类型名。

edgeType(typeName: string): string

enumTableCodecenumTableCodec(枚举表 Codec 名称)​

Added by PgEnumTablesPlugin.

由 PgEnumTablesPlugin 添加。

Name of the codec used to represent an enum table as an enum. You probably want enumTableEnum instead.

用于将枚举表表示为枚举类型的 codec 名称。通常情况下,你需要的应该是 enumTableEnum。

enumTableCodec(details: {
serviceName: string;
pgClass: PgClass;
pgConstraint: PgConstraint;
}): string

enumTableEnumenumTableEnum(枚举表 GraphQL 枚举名)​

Added by PgEnumTablesPlugin.

由 PgEnumTablesPlugin 添加。

Overridden by:

被以下插件覆盖:

  • PgV4InflectionPlugin

    PgV4InflectionPlugin(V4 命名推导插件)

Name of the GraphQL enum used to represent an enum table in the schema.

用于在 GraphQL schema 中表示枚举表的 GraphQL 枚举类型名称。

enumTableEnum(details: {
serviceName: string;
pgClass: PgClass;
pgConstraint: PgConstraint;
}): string

enumTypeenumType(枚举类型名)​

Added by PgCodecsPlugin.

由 PgCodecsPlugin 添加。

enumType(codec: PgEnumCodec<string, any>): string

enumValueenumValue(枚举值名)​

Added by PgCodecsPlugin.

由 PgCodecsPlugin 添加。

Overridden by:

被以下插件覆盖:

  • PgV4InflectionPlugin

    PgV4InflectionPlugin(V4 命名推导插件)

enumValue(value: string, codec: PgEnumCodec<string, any>): string

functionMutationResultFieldNamefunctionMutationResultFieldName(函数 Mutation 结果字段名)​

Added by PgCustomTypeFieldPlugin.

由 PgCustomTypeFieldPlugin 添加。

Overridden by:

被以下插件覆盖:

  • PgV4InflectionPlugin

    PgV4InflectionPlugin(V4 命名推导插件)

functionMutationResultFieldName(details: GraphileBuild.InflectionCustomFieldMutationResult): string

functionRecordReturnCodecNamefunctionRecordReturnCodecName(函数返回记录的 Codec 名)​

Added by PgProceduresPlugin.

由 PgProceduresPlugin 添加。

functionRecordReturnCodecName(details: {
serviceName: string;
pgProc: PgProc;
}): string

functionResourceNamefunctionResourceName(函数对应 Resource 名)​

Added by PgProceduresPlugin.

由 PgProceduresPlugin 添加。

functionResourceName(details: {
serviceName: string;
pgProc: PgProc;
}): string

inputTypeinputType(Input 类型名)​

Builtin inflector.

内置 inflector。

Given the name of a GraphQL output type, what name should we use for the equivalent input type?

给定一个 GraphQL 输出类型的名称,返回等价的 input 类型应使用的名称。

inputType(typeName: string): string

listFieldlistField(列表字段名)​

Builtin inflector.

内置 inflector。

The name of a field that returns a list

返回列表的字段名称。

listField(baseName: string): string

manyRelationConnectionmanyRelationConnection(一对多 relation Connection 字段名)​

Added by PgRelationsPlugin.

由 PgRelationsPlugin 添加。

manyRelationConnection(details: GraphileBuild.PgRelationsPluginRelationDetails): string

manyRelationListmanyRelationList(一对多 relation 列表字段名)​

Added by PgRelationsPlugin.

由 PgRelationsPlugin 添加。

manyRelationList(details: GraphileBuild.PgRelationsPluginRelationDetails): string

nodeByIdnodeById(按 Node ID 查询字段名)​

Added by NodeAccessorPlugin.

由 NodeAccessorPlugin 添加。

nodeById(typeName: string): string

nodeIdAttributenodeIdAttribute(关联 Node ID 输入属性名)​

Added by PgNodeIdAttributesPlugin.

由 PgNodeIdAttributesPlugin 添加。

The name of the attribute used as an ID input representing a related record ultimately representing the underlying keys.

用作 ID 输入的参数属性名,代表关联记录并最终映射到底层的关联键。

nodeIdAttribute(details: {
registry: PgRegistry;
codec: PgCodecWithAttributes;
relationName: string;
}): string

nodeIdFieldNamenodeIdFieldName(Node ID 字段名)​

Added by NodePlugin.

由 NodePlugin 添加。

Overridden by:

被以下插件覆盖:

  • PostGraphileV4CompatibilityPlugin

    PostGraphileV4CompatibilityPlugin(V4 兼容插件)

  • PgRelayPlugin

    PgRelayPlugin(Relay 兼容插件)

nodeIdFieldName(): string

orderByAttributeEnumorderByAttributeEnum(属性排序枚举值)​

Added by PgOrderAllAttributesPlugin.

由 PgOrderAllAttributesPlugin 添加。

Overridden by:

被以下插件覆盖:

  • PgV4InflectionPlugin

    PgV4InflectionPlugin(V4 命名推导插件)

orderByAttributeEnum(details: {
codec: PgCodecWithAttributes;
attributeName: string;
variant: "asc" | "desc" | "asc_nulls_last" | "desc_nulls_last";
}): string

orderByTypeorderByType(排序枚举类型名)​

Added by PgConnectionArgOrderByPlugin.

由 PgConnectionArgOrderByPlugin 添加。

Overridden by:

被以下插件覆盖:

  • PgV4InflectionPlugin

    PgV4InflectionPlugin(V4 命名推导插件)

orderByType(typeName: string): string

patchFieldpatchField(Patch 输入字段名)​

Added by PgMutationUpdateDeletePlugin.

由 PgMutationUpdateDeletePlugin 添加。

patchField(fieldName: string): string

patchTypepatchType(Patch 类型名)​

Added by PgTablesPlugin.

由 PgTablesPlugin 添加。

patchType(typeName: string): string

pgPolymorphismEnumTypepgPolymorphismEnumType(多态类型鉴别枚举名)​

Added by PgPolymorphismOnlyArgumentPlugin.

由 PgPolymorphismOnlyArgumentPlugin 添加。

pgPolymorphismEnumType(pgCodec: PgCodec): string

pgPolymorphismOnlyArgumentpgPolymorphismOnlyArgument(多态类型筛选参数名)​

Added by PgPolymorphismOnlyArgumentPlugin.

由 PgPolymorphismOnlyArgumentPlugin 添加。

pgPolymorphismOnlyArgument(pgCodec: PgCodec): string

pluralizepluralize(英文单词复数化)​

Builtin inflector.

内置 inflector。

pluralize: (text: string) => string

rangeBoundTyperangeBoundType(范围边界类型名)​

Added by PgCodecsPlugin.

由 PgCodecsPlugin 添加。

rangeBoundType(input: {
codec: PgCodecAnyScalar;
underlyingTypeName: string;
}): string

rangeTyperangeType(范围类型名)​

Added by PgCodecsPlugin.

由 PgCodecsPlugin 添加。

rangeType(input: {
codec: PgCodecAnyScalar;
underlyingTypeName: string;
}): string

recordFunctionConnectionTyperecordFunctionConnectionType(记录函数 Connection 类型名)​

Added by PgCustomTypeFieldPlugin.

由 PgCustomTypeFieldPlugin 添加。

recordFunctionConnectionType(details: GraphileBuild.InflectionCustomFieldProcedureDetails): string

recordFunctionEdgeTyperecordFunctionEdgeType(记录函数 Edge 类型名)​

Added by PgCustomTypeFieldPlugin.

由 PgCustomTypeFieldPlugin 添加。

recordFunctionEdgeType(details: GraphileBuild.InflectionCustomFieldProcedureDetails): string

refConnectionrefConnection(自定义引用 Connection 字段名)​

Added by PgRefsPlugin.

由 PgRefsPlugin 添加。

refConnection(details: {
refDefinition: PgRefDefinition;
identifier: string;
}): string

refListrefList(自定义引用列表字段名)​

Added by PgRefsPlugin.

由 PgRefsPlugin 添加。

refList(details: {
refDefinition: PgRefDefinition;
identifier: string;
}): string

refSinglerefSingle(自定义引用单条字段名)​

Added by PgRefsPlugin.

由 PgRefsPlugin 添加。

refSingle(details: {
refDefinition: PgRefDefinition;
identifier: string;
}): string

resourceRelationNameresourceRelationName(Resource 关联关系名)​

Added by PgRelationsPlugin.

由 PgRelationsPlugin 添加。

resourceRelationName(details: {
serviceName: string;
pgConstraint: PgConstraint;
localClass: PgClass;
localAttributes: PgAttribute[];
foreignClass: PgClass;
foreignAttributes: PgAttribute[];
isUnique: boolean;
isReferencee: boolean;
}): string

rowByUniquerowByUnique(按唯一键查询单行字段名)​

Added by PgRowByUniquePlugin.

由 PgRowByUniquePlugin 添加。

rowByUnique(details: {
unique: PgResourceUnique;
resource: PgResource<any, any, any, any, any>;
}): string

scalarCodecTypeNamescalarCodecTypeName(标量 Codec 类型名)​

Added by PgCodecsPlugin.

由 PgCodecsPlugin 添加。

scalarCodecTypeName(codec: PgCodecAnyScalar): string

scalarFunctionConnectionTypescalarFunctionConnectionType(标量函数 Connection 类型名)​

Added by PgCustomTypeFieldPlugin.

由 PgCustomTypeFieldPlugin 添加。

scalarFunctionConnectionType(details: GraphileBuild.InflectionCustomFieldProcedureDetails): string

scalarFunctionEdgeTypescalarFunctionEdgeType(标量函数 Edge 类型名)​

Added by PgCustomTypeFieldPlugin.

由 PgCustomTypeFieldPlugin 添加。

scalarFunctionEdgeType(details: GraphileBuild.InflectionCustomFieldProcedureDetails): string

singleRelationsingleRelation(正向单条 relation 字段名)​

Added by PgRelationsPlugin.

由 PgRelationsPlugin 添加。

singleRelation(details: GraphileBuild.PgRelationsPluginRelationDetails): string

singleRelationBackwardssingleRelationBackwards(反向单条 relation 字段名)​

Added by PgRelationsPlugin.

由 PgRelationsPlugin 添加。

singleRelationBackwards(details: GraphileBuild.PgRelationsPluginRelationDetails): string

singularizesingularize(英文单词单数化)​

Builtin inflector.

内置 inflector。

singularize: (text: string) => string

tableConnectionTypetableConnectionType(表 Connection 类型名)​

Added by PgTablesPlugin.

由 PgTablesPlugin 添加。

Overridden by:

被以下插件覆盖:

  • PgV4InflectionPlugin

    PgV4InflectionPlugin(V4 命名推导插件)

tableConnectionType(codec: PgCodec<any, any, any, any, any, any, any>): string

tableEdgeFieldtableEdgeField(Payload 中的表 Edge 字段名)​

Added by PgMutationPayloadEdgePlugin.

由 PgMutationPayloadEdgePlugin 添加。

Overridden by:

被以下插件覆盖:

  • PgV4InflectionPlugin

    PgV4InflectionPlugin(V4 命名推导插件)

tableEdgeField(codec: PgCodecWithAttributes): string

tableEdgeTypetableEdgeType(表 Edge 类型名)​

Added by PgTablesPlugin.

由 PgTablesPlugin 添加。

Overridden by:

被以下插件覆盖:

  • PgV4InflectionPlugin

    PgV4InflectionPlugin(V4 命名推导插件)

tableEdgeType(codec: PgCodec<any, any, any, any, any, any, any>): string

tableFieldNametableFieldName(Payload 中的表记录字段名)​

Added by PgMutationCreatePlugin.

由 PgMutationCreatePlugin 添加。

tableFieldName(resource: PgResource<any, any, any, any, any>): string

tableResourceNametableResourceName(表对应 Resource 名称)​

Added by PgTablesPlugin.

由 PgTablesPlugin 添加。

The name of the PgResource for a table/class

表或 pg_class 对应的 PgResource 名称。

tableResourceName(details: {
serviceName: string;
pgClass: PgClass;
}): string

tableTypetableType(表对象类型名)​

Added by PgTablesPlugin.

由 PgTablesPlugin 添加。

The name of the GraphQL Object Type that's generated to represent a specific table (more specifically a PostgreSQL "pg_class" which is represented as a certain PgCodec)

为特定表(更准确地说,是由某个 PgCodec 表示的 PostgreSQL pg_class)生成的 GraphQL 对象类型名称。

tableType(codec: PgCodec<any, any, any, any, any, any, any>): string

typeCodecNametypeCodecName(pg_type 对应 Codec 名)​

Added by PgCodecsPlugin.

由 PgCodecsPlugin 添加。

typeCodecName(details: {
pgType: PgType;
serviceName: string;
}): string

updateByKeysFieldupdateByKeysField(按唯一键更新 Mutation 字段名)​

Added by PgMutationUpdateDeletePlugin.

由 PgMutationUpdateDeletePlugin 添加。

updateByKeysField(details: {
resource: PgResource<any, any, any, any, any>;
unique: PgResourceUnique;
}): string

updateByKeysInputTypeupdateByKeysInputType(按唯一键更新 Input 类型名)​

Added by PgMutationUpdateDeletePlugin.

由 PgMutationUpdateDeletePlugin 添加。

updateByKeysInputType(details: {
resource: PgResource<any, any, any, any, any>;
unique: PgResourceUnique;
}): string

updateNodeFieldupdateNodeField(按 Node ID 更新 Mutation 字段名)​

Added by PgMutationUpdateDeletePlugin.

由 PgMutationUpdateDeletePlugin 添加。

updateNodeField(details: {
resource: PgResource<any, any, any, any, any>;
unique: PgResourceUnique;
}): string

updateNodeInputTypeupdateNodeInputType(按 Node ID 更新 Input 类型名)​

Added by PgMutationUpdateDeletePlugin.

由 PgMutationUpdateDeletePlugin 添加。

updateNodeInputType(details: {
resource: PgResource<any, any, any, any, any>;
unique: PgResourceUnique;
}): string

updatePayloadTypeupdatePayloadType(更新 Payload 类型名)​

Added by PgMutationUpdateDeletePlugin.

由 PgMutationUpdateDeletePlugin 添加。

updatePayloadType(details: {
resource: PgResource<any, any, any, any, any>;
}): string

upperCamelCaseupperCamelCase(大驼峰命名转换)​

Builtin inflector.

内置 inflector。

upperCamelCase: (text: string) => string