Diff
checker
文本
文本
圖像
文檔
Excel
文件夾
Legal
Enterprise
桌面版
定價
登入
下載 Diffchecker 桌面版
比較文本
尋找兩個文字檔案之間的差異
工具
歷史
即時編輯器
摺疊未變更行
關閉換行
檢視
拆分
統一
比對精度
智能
單詞
字符
語法突出顯示
選擇語法
忽略
文字轉換
前往第一個差異
編輯輸入
Diffchecker Desktop
執行Diffchecker最安全的方式。取得Diffchecker桌面應用程式:您的差異永遠不會離開您的電腦!
取得桌面版
Lighthouse GraphQL Helper Schema Bug
建立於
5 年前
差異永不過期
清除
匯出
分享
解釋
27 刪除
行
總計
刪除
字符
總計
刪除
要繼續使用此功能,請升級到
Diff
checker
Pro
查看價格
904 行
全部複製
25 新增
行
總計
新增
字符
總計
新增
要繼續使用此功能,請升級到
Diff
checker
Pro
查看價格
913 行
全部複製
# File generated by "php artisan lighthouse:ide-helper".
# File generated by "php artisan lighthouse:ide-helper".
# Do not edit this file directly.
# Do not edit this file directly.
# This file should be ignored by git as it can be autogenerated.
# This file should be ignored by git as it can be autogenerated.
# Directive class: Nuwave\Lighthouse\GlobalId\GlobalIdDirective
# Directive class: Nuwave\Lighthouse\GlobalId\GlobalIdDirective
複製
已複製
複製
已複製
# Base types, required for extending.
type Query {}
type Mutation {}
type Subscription {}
# Missing type & input definitions
input Map {
key: String!
value: String!
}
input RulesMessageMap {
rules: [Map]
}
input BelongsToManyType {
type: String!
}
input Mixed {
input: [String]
}
"""
"""
Converts between IDs/types and global IDs.
Converts between IDs/types and global IDs.
When used upon a field, it encodes;
When used upon a field, it encodes;
when used upon an argument, it decodes.
when used upon an argument, it decodes.
"""
"""
directive @globalId(
directive @globalId(
"""
"""
Decoding a global id produces a tuple of `$type` and `$id`.
Decoding a global id produces a tuple of `$type` and `$id`.
This setting controls which of those is passed along.
This setting controls which of those is passed along.
"""
"""
decode: GlobalIdDecode = ARRAY
decode: GlobalIdDecode = ARRAY
) on FIELD_DEFINITION | INPUT_FIELD_DEFINITION | ARGUMENT_DEFINITION
) on FIELD_DEFINITION | INPUT_FIELD_DEFINITION | ARGUMENT_DEFINITION
"""
"""
Options for the `decode` argument of `@globalId`.
Options for the `decode` argument of `@globalId`.
"""
"""
enum GlobalIdDecode {
enum GlobalIdDecode {
"""
"""
Return an array of `[$type, $id]`.
Return an array of `[$type, $id]`.
"""
"""
ARRAY
ARRAY
"""
"""
Return just `$type`.
Return just `$type`.
"""
"""
TYPE
TYPE
"""
"""
Return just `$id`.
Return just `$id`.
"""
"""
ID
ID
}
}
# Directive class: Nuwave\Lighthouse\OrderBy\OrderByDirective
# Directive class: Nuwave\Lighthouse\OrderBy\OrderByDirective
"""
"""
Sort a result list by one or more given columns.
Sort a result list by one or more given columns.
"""
"""
directive @orderBy(
directive @orderBy(
"""
"""
Restrict the allowed column names to a well-defined list.
Restrict the allowed column names to a well-defined list.
This improves introspection capabilities and security.
This improves introspection capabilities and security.
Mutually exclusive with the `columnsEnum` argument.
Mutually exclusive with the `columnsEnum` argument.
"""
"""
columns: [String!]
columns: [String!]
"""
"""
Use an existing enumeration type to restrict the allowed columns to a predefined list.
Use an existing enumeration type to restrict the allowed columns to a predefined list.
This allowes you to re-use the same enum for multiple fields.
This allowes you to re-use the same enum for multiple fields.
Mutually exclusive with the `columns` argument.
Mutually exclusive with the `columns` argument.
"""
"""
columnsEnum: String
columnsEnum: String
) on ARGUMENT_DEFINITION
) on ARGUMENT_DEFINITION
# Directive class: Nuwave\Lighthouse\Pagination\PaginateDirective
# Directive class: Nuwave\Lighthouse\Pagination\PaginateDirective
"""
"""
Query multiple model entries as a paginated list.
Query multiple model entries as a paginated list.
"""
"""
directive @paginate(
directive @paginate(
"""
"""
Which pagination style should be used.
Which pagination style should be used.
"""
"""
type: PaginateType = PAGINATOR
type: PaginateType = PAGINATOR
"""
"""
Specify the class name of the model to use.
Specify the class name of the model to use.
This is only needed when the default model detection does not work.
This is only needed when the default model detection does not work.
"""
"""
model: String
model: String
"""
"""
Point to a function that provides a Query Builder instance.
Point to a function that provides a Query Builder instance.
This replaces the use of a model.
This replaces the use of a model.
"""
"""
builder: String
builder: String
"""
"""
Apply scopes to the underlying query.
Apply scopes to the underlying query.
"""
"""
scopes: [String!]
scopes: [String!]
"""
"""
Allow clients to query paginated lists without specifying the amount of items.
Allow clients to query paginated lists without specifying the amount of items.
Overrules the `pagination.default_count` setting from `lighthouse.php`.
Overrules the `pagination.default_count` setting from `lighthouse.php`.
"""
"""
defaultCount: Int
defaultCount: Int
"""
"""
Limit the maximum amount of items that clients can request from paginated lists.
Limit the maximum amount of items that clients can request from paginated lists.
Overrules the `pagination.max_count` setting from `lighthouse.php`.
Overrules the `pagination.max_count` setting from `lighthouse.php`.
"""
"""
maxCount: Int
maxCount: Int
) on FIELD_DEFINITION
) on FIELD_DEFINITION
複製
已複製
複製
已複製
"""
Options for the `type` argument of `@paginate`.
"""
enum PaginateType {
"""
Offset-based pagination, similar to the Laravel default.
"""
PAGINATOR
"""
Cursor-based pagination, compatible with the Relay specification.
"""
CONNECTION
}
# Directive class: Nuwave\Lighthouse\SoftDeletes\ForceDeleteDirective
# Directive class: Nuwave\Lighthouse\SoftDeletes\ForceDeleteDirective
"""
"""
Permanently remove one or more soft deleted models by their ID.
Permanently remove one or more soft deleted models by their ID.
The field must have a single non-null argument that may be a list.
The field must have a single non-null argument that may be a list.
"""
"""
directive @forceDelete(
directive @forceDelete(
"""
"""
Set to `true` to use global ids for finding the model.
Set to `true` to use global ids for finding the model.
If set to `false`, regular non-global ids are used.
If set to `false`, regular non-global ids are used.
"""
"""
globalId: Boolean = false
globalId: Boolean = false
"""
"""
Specify the class name of the model to use.
Specify the class name of the model to use.
This is only needed when the default model detection does not work.
This is only needed when the default model detection does not work.
"""
"""
model: String
model: String
) on FIELD_DEFINITION
) on FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\SoftDeletes\RestoreDirective
# Directive class: Nuwave\Lighthouse\SoftDeletes\RestoreDirective
"""
"""
Un-delete one or more soft deleted models by their ID.
Un-delete one or more soft deleted models by their ID.
The field must have a single non-null argument that may be a list.
The field must have a single non-null argument that may be a list.
"""
"""
directive @restore(
directive @restore(
"""
"""
Set to `true` to use global ids for finding the model.
Set to `true` to use global ids for finding the model.
If set to `false`, regular non-global ids are used.
If set to `false`, regular non-global ids are used.
"""
"""
globalId: Boolean = false
globalId: Boolean = false
"""
"""
Specify the class name of the model to use.
Specify the class name of the model to use.
This is only needed when the default model detection does not work.
This is only needed when the default model detection does not work.
"""
"""
model: String
model: String
) on FIELD_DEFINITION
) on FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\SoftDeletes\SoftDeletesDirective
# Directive class: Nuwave\Lighthouse\SoftDeletes\SoftDeletesDirective
"""
"""
Allows to filter if trashed elements should be fetched.
Allows to filter if trashed elements should be fetched.
This manipulates the schema by adding the argument
This manipulates the schema by adding the argument
`trashed: Trashed @trashed` to the field.
`trashed: Trashed @trashed` to the field.
"""
"""
directive @softDeletes on FIELD_DEFINITION
directive @softDeletes on FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\SoftDeletes\TrashedDirective
# Directive class: Nuwave\Lighthouse\SoftDeletes\TrashedDirective
"""
"""
Allows to filter if trashed elements should be fetched.
Allows to filter if trashed elements should be fetched.
"""
"""
directive @trashed on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION
directive @trashed on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\Validation\RulesDirective
# Directive class: Nuwave\Lighthouse\Validation\RulesDirective
"""
"""
Validate an argument using [Laravel validation](https://laravel.com/docs/validation).
Validate an argument using [Laravel validation](https://laravel.com/docs/validation).
"""
"""
directive @rules(
directive @rules(
"""
"""
Specify the validation rules to apply to the field.
Specify the validation rules to apply to the field.
This can either be a reference to [Laravel's built-in validation rules](https://laravel.com/docs/validation#available-validation-rules),
This can either be a reference to [Laravel's built-in validation rules](https://laravel.com/docs/validation#available-validation-rules),
or the fully qualified class name of a custom validation rule.
or the fully qualified class name of a custom validation rule.
Rules that mutate the incoming arguments, such as `exclude_if`, are not supported
Rules that mutate the incoming arguments, such as `exclude_if`, are not supported
by Lighthouse. Use ArgTransformerDirectives or FieldMiddlewareDirectives instead.
by Lighthouse. Use ArgTransformerDirectives or FieldMiddlewareDirectives instead.
"""
"""
apply: [String!]!
apply: [String!]!
"""
"""
Specify a custom attribute name to use in your validation message.
Specify a custom attribute name to use in your validation message.
"""
"""
attribute: String
attribute: String
"""
"""
Specify the messages to return if the validators fail.
Specify the messages to return if the validators fail.
Specified as an input object that maps rules to messages,
Specified as an input object that maps rules to messages,
e.g. { email: "Must be a valid email", max: "The input was too long" }
e.g. { email: "Must be a valid email", max: "The input was too long" }
"""
"""
messages: RulesMessageMap
messages: RulesMessageMap
複製
已複製
複製
已複製
)
repeatable
on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION
)
on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\Validation\RulesForArrayDirective
# Directive class: Nuwave\Lighthouse\Validation\RulesForArrayDirective
"""
"""
Run validation on an array itself, using [Laravel built-in validation](https://laravel.com/docs/validation).
Run validation on an array itself, using [Laravel built-in validation](https://laravel.com/docs/validation).
"""
"""
directive @rulesForArray(
directive @rulesForArray(
"""
"""
Specify the validation rules to apply to the field.
Specify the validation rules to apply to the field.
This can either be a reference to any of Laravel's built-in validation rules: https://laravel.com/docs/validation#available-validation-rules,
This can either be a reference to any of Laravel's built-in validation rules: https://laravel.com/docs/validation#available-validation-rules,
or the fully qualified class name of a custom validation rule.
or the fully qualified class name of a custom validation rule.
"""
"""
apply: [String!]!
apply: [String!]!
"""
"""
Specify a custom attribute name to use in your validation message.
Specify a custom attribute name to use in your validation message.
"""
"""
attribute: String
attribute: String
"""
"""
Specify the messages to return if the validators fail.
Specify the messages to return if the validators fail.
Specified as an input object that maps rules to messages,
Specified as an input object that maps rules to messages,
e.g. { email: "Must be a valid email", max: "The input was too long" }
e.g. { email: "Must be a valid email", max: "The input was too long" }
"""
"""
messages: RulesMessageMap
messages: RulesMessageMap
複製
已複製
複製
已複製
)
repeatable
on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION
)
on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\Validation\ValidateDirective
# Directive class: Nuwave\Lighthouse\Validation\ValidateDirective
"""
"""
Run validation on a field.
Run validation on a field.
"""
"""
directive @validate on FIELD_DEFINITION
directive @validate on FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\Validation\ValidatorDirective
# Directive class: Nuwave\Lighthouse\Validation\ValidatorDirective
"""
"""
Provide validation rules through a PHP class.
Provide validation rules through a PHP class.
"""
"""
directive @validator(
directive @validator(
"""
"""
The name of the class to use.
The name of the class to use.
If defined on an input, this defaults to a class called `{$inputName}Validator` in the
If defined on an input, this defaults to a class called `{$inputName}Validator` in the
default validator namespace. For fields, it uses the name of the parent type
default validator namespace. For fields, it uses the name of the parent type
and the field name: `{$parent}{$field}Validator`.
and the field name: `{$parent}{$field}Validator`.
"""
"""
class: String
class: String
複製
已複製
複製
已複製
)
repeatable
on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION | FIELD_DEFINITION | INPUT_OBJECT
)
on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION | FIELD_DEFINITION | INPUT_OBJECT
# Directive class: Nuwave\Lighthouse\Tracing\TracingDirective
# Directive class: Nuwave\Lighthouse\Tracing\TracingDirective
"""
"""
Do not use this directive directly, it is automatically added to the schema
Do not use this directive directly, it is automatically added to the schema
when using the tracing extension.
when using the tracing extension.
"""
"""
directive @tracing on FIELD_DEFINITION
directive @tracing on FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\Schema\Directives\AllDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\AllDirective
"""
"""
Fetch all Eloquent models and return the collection as the result.
Fetch all Eloquent models and return the collection as the result.
"""
"""
directive @all(
directive @all(
"""
"""
Specify the class name of the model to use.
Specify the class name of the model to use.
This is only needed when the default model detection does not work.
This is only needed when the default model detection does not work.
"""
"""
model: String
model: String
"""
"""
Apply scopes to the underlying query.
Apply scopes to the underlying query.
"""
"""
scopes: [String!]
scopes: [String!]
) on FIELD_DEFINITION
) on FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\Schema\Directives\AuthDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\AuthDirective
"""
"""
Return the currently authenticated user as the result of a query.
Return the currently authenticated user as the result of a query.
"""
"""
directive @auth(
directive @auth(
"""
"""
Specify which guard to use, e.g. "api".
Specify which guard to use, e.g. "api".
When not defined, the default from `lighthouse.php` is used.
When not defined, the default from `lighthouse.php` is used.
"""
"""
guard: String
guard: String
) on FIELD_DEFINITION
) on FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\Schema\Directives\BelongsToDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\BelongsToDirective
"""
"""
Resolves a field through the Eloquent `BelongsTo` relationship.
Resolves a field through the Eloquent `BelongsTo` relationship.
"""
"""
directive @belongsTo(
directive @belongsTo(
"""
"""
Specify the relationship method name in the model class,
Specify the relationship method name in the model class,
if it is named different from the field in the schema.
if it is named different from the field in the schema.
"""
"""
relation: String
relation: String
"""
"""
Apply scopes to the underlying query.
Apply scopes to the underlying query.
"""
"""
scopes: [String!]
scopes: [String!]
) on FIELD_DEFINITION
) on FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\Schema\Directives\BelongsToManyDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\BelongsToManyDirective
"""
"""
Resolves a field through the Eloquent `BelongsToMany` relationship.
Resolves a field through the Eloquent `BelongsToMany` relationship.
"""
"""
directive @belongsToMany(
directive @belongsToMany(
"""
"""
Specify the relationship method name in the model class,
Specify the relationship method name in the model class,
if it is named different from the field in the schema.
if it is named different from the field in the schema.
"""
"""
relation: String
relation: String
"""
"""
Apply scopes to the underlying query.
Apply scopes to the underlying query.
"""
"""
scopes: [String!]
scopes: [String!]
"""
"""
Allows to resolve the relation as a paginated list.
Allows to resolve the relation as a paginated list.
"""
"""
type: BelongsToManyType
type: BelongsToManyType
"""
"""
Allow clients to query paginated lists without specifying the amount of items.
Allow clients to query paginated lists without specifying the amount of items.
Overrules the `pagination.default_count` setting from `lighthouse.php`.
Overrules the `pagination.default_count` setting from `lighthouse.php`.
"""
"""
defaultCount: Int
defaultCount: Int
"""
"""
Limit the maximum amount of items that clients can request from paginated lists.
Limit the maximum amount of items that clients can request from paginated lists.
Overrules the `pagination.max_count` setting from `lighthouse.php`.
Overrules the `pagination.max_count` setting from `lighthouse.php`.
"""
"""
maxCount: Int
maxCount: Int
"""
"""
Specify a custom type that implements the Edge interface
Specify a custom type that implements the Edge interface
to extend edge object.
to extend edge object.
Only applies when using Relay style "connection" pagination.
Only applies when using Relay style "connection" pagination.
"""
"""
edgeType: String
edgeType: String
) on FIELD_DEFINITION
) on FIELD_DEFINITION
"""
"""
Options for the `type` argument of `@belongsToMany`.
Options for the `type` argument of `@belongsToMany`.
"""
"""
enum PaginateType {
enum PaginateType {
"""
"""
Offset-based pagination, similar to the Laravel default.
Offset-based pagination, similar to the Laravel default.
"""
"""
PAGINATOR
PAGINATOR
"""
"""
Cursor-based pagination, compatible with the Relay specification.
Cursor-based pagination, compatible with the Relay specification.
"""
"""
CONNECTION
CONNECTION
}
}
# Directive class: Nuwave\Lighthouse\Schema\Directives\BroadcastDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\BroadcastDirective
"""
"""
Broadcast the results of a mutation to subscribed clients.
Broadcast the results of a mutation to subscribed clients.
"""
"""
directive @broadcast(
directive @broadcast(
"""
"""
Name of the subscription that should be retriggered as a result of this operation.
Name of the subscription that should be retriggered as a result of this operation.
"""
"""
subscription: String!
subscription: String!
"""
"""
Specify whether or not the job should be queued.
Specify whether or not the job should be queued.
This defaults to the global config option `lighthouse.subscriptions.queue_broadcasts`.
This defaults to the global config option `lighthouse.subscriptions.queue_broadcasts`.
"""
"""
shouldQueue: Boolean
shouldQueue: Boolean
複製
已複製
複製
已複製
)
repeatable
on FIELD_DEFINITION
)
on FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\Schema\Directives\BuilderDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\BuilderDirective
"""
"""
Use an argument to modify the query builder for a field.
Use an argument to modify the query builder for a field.
"""
"""
directive @builder(
directive @builder(
"""
"""
Reference a method that is passed the query builder.
Reference a method that is passed the query builder.
Consists of two parts: a class name and a method name, separated by an `@` symbol.
Consists of two parts: a class name and a method name, separated by an `@` symbol.
If you pass only a class name, the method name defaults to `__invoke`.
If you pass only a class name, the method name defaults to `__invoke`.
"""
"""
method: String!
method: String!
複製
已複製
複製
已複製
)
repeatable
on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION
)
on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\Schema\Directives\CacheDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\CacheDirective
"""
"""
Cache the result of a resolver.
Cache the result of a resolver.
"""
"""
directive @cache(
directive @cache(
"""
"""
Set the duration it takes for the cache to expire in seconds.
Set the duration it takes for the cache to expire in seconds.
If not given, the result will be stored forever.
If not given, the result will be stored forever.
"""
"""
maxAge: Int
maxAge: Int
"""
"""
Limit access to cached data to the currently authenticated user.
Limit access to cached data to the currently authenticated user.
When the field is accessible by guest users, this will not have
When the field is accessible by guest users, this will not have
any effect, they will access a shared cache.
any effect, they will access a shared cache.
"""
"""
private: Boolean = false
private: Boolean = false
) on FIELD_DEFINITION
) on FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\Schema\Directives\CacheKeyDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\CacheKeyDirective
"""
"""
Specify the field to use as a key when creating a cache.
Specify the field to use as a key when creating a cache.
"""
"""
directive @cacheKey on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION
directive @cacheKey on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\Schema\Directives\CanDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\CanDirective
"""
"""
Check a Laravel Policy to ensure the current user is authorized to access a field.
Check a Laravel Policy to ensure the current user is authorized to access a field.
When `injectArgs` and `args` are used together, the client given
When `injectArgs` and `args` are used together, the client given
arguments will be passed before the static args.
arguments will be passed before the static args.
"""
"""
directive @can(
directive @can(
"""
"""
The ability to check permissions for.
The ability to check permissions for.
"""
"""
ability: String!
ability: String!
"""
"""
If your policy checks against specific model instances, specify
If your policy checks against specific model instances, specify
the name of the field argument that contains its primary key(s).
the name of the field argument that contains its primary key(s).
You may pass the string in dot notation to use nested inputs.
You may pass the string in dot notation to use nested inputs.
"""
"""
find: String
find: String
"""
"""
Specify the class name of the model to use.
Specify the class name of the model to use.
This is only needed when the default model detection does not work.
This is only needed when the default model detection does not work.
"""
"""
model: String
model: String
"""
"""
Pass along the client given input data as arguments to `Gate::check`.
Pass along the client given input data as arguments to `Gate::check`.
"""
"""
injectArgs: Boolean = false
injectArgs: Boolean = false
"""
"""
Statically defined arguments that are passed to `Gate::check`.
Statically defined arguments that are passed to `Gate::check`.
You may pass pass arbitrary GraphQL literals,
You may pass pass arbitrary GraphQL literals,
e.g.: [1, 2, 3] or { foo: "bar" }
e.g.: [1, 2, 3] or { foo: "bar" }
"""
"""
args: Mixed
args: Mixed
複製
已複製
複製
已複製
)
repeatable
on FIELD_DEFINITION
)
on FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\Schema\Directives\ComplexityDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\ComplexityDirective
"""
"""
Customize the calculation of a fields complexity score before execution.
Customize the calculation of a fields complexity score before execution.
"""
"""
directive @complexity(
directive @complexity(
"""
"""
Reference a function to customize the complexity score calculation.
Reference a function to customize the complexity score calculation.
Consists of two parts: a class name and a method name, seperated by an `@` symbol.
Consists of two parts: a class name and a method name, seperated by an `@` symbol.
If you pass only a class name, the method name defaults to `__invoke`.
If you pass only a class name, the method name defaults to `__invoke`.
"""
"""
resolver: String
resolver: String
) on FIELD_DEFINITION
) on FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\Schema\Directives\CountDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\CountDirective
"""
"""
Returns the count of a given relationship or model.
Returns the count of a given relationship or model.
"""
"""
directive @count(
directive @count(
"""
"""
The relationship which you want to run the count on.
The relationship which you want to run the count on.
"""
"""
relation: String
relation: String
"""
"""
The model to run the count on.
The model to run the count on.
"""
"""
model: String
model: String
"""
"""
Apply scopes to the underlying query.
Apply scopes to the underlying query.
"""
"""
scopes: [String!]
scopes: [String!]
) on FIELD_DEFINITION
) on FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\Schema\Directives\CreateDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\CreateDirective
"""
"""
Create a new Eloquent model with the given arguments.
Create a new Eloquent model with the given arguments.
"""
"""
directive @create(
directive @create(
"""
"""
Specify the class name of the model to use.
Specify the class name of the model to use.
This is only needed when the default model detection does not work.
This is only needed when the default model detection does not work.
"""
"""
model: String
model: String
"""
"""
Specify the name of the relation on the parent model.
Specify the name of the relation on the parent model.
This is only needed when using this directive as a nested arg
This is only needed when using this directive as a nested arg
resolver and if the name of the relation is not the arg name.
resolver and if the name of the relation is not the arg name.
"""
"""
relation: String
relation: String
) on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION
) on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\Schema\Directives\DeleteDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\DeleteDirective
"""
"""
Delete one or more models by their ID.
Delete one or more models by their ID.
The field must have a single non-null argument that may be a list.
The field must have a single non-null argument that may be a list.
"""
"""
directive @delete(
directive @delete(
"""
"""
Set to `true` to use global ids for finding the model.
Set to `true` to use global ids for finding the model.
If set to `false`, regular non-global ids are used.
If set to `false`, regular non-global ids are used.
"""
"""
globalId: Boolean = false
globalId: Boolean = false
"""
"""
Specify the class name of the model to use.
Specify the class name of the model to use.
This is only needed when the default model detection does not work.
This is only needed when the default model detection does not work.
"""
"""
model: String
model: String
"""
"""
Specify the name of the relation on the parent model.
Specify the name of the relation on the parent model.
This is only needed when using this directive as a nested arg
This is only needed when using this directive as a nested arg
resolver and if the name of the relation is not the arg name.
resolver and if the name of the relation is not the arg name.
"""
"""
relation: String
relation: String
) on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION
) on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\Schema\Directives\DeprecatedDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\DeprecatedDirective
"""
"""
Marks an element of a GraphQL schema as no longer supported.
Marks an element of a GraphQL schema as no longer supported.
"""
"""
directive @deprecated(
directive @deprecated(
"""
"""
Explains why this element was deprecated, usually also including a
Explains why this element was deprecated, usually also including a
suggestion for how to access supported similar data. Formatted
suggestion for how to access supported similar data. Formatted
in [Markdown](https://daringfireball.net/projects/markdown/).
in [Markdown](https://daringfireball.net/projects/markdown/).
"""
"""
reason: String = "No longer supported"
reason: String = "No longer supported"
) on FIELD_DEFINITION | ENUM_VALUE
) on FIELD_DEFINITION | ENUM_VALUE
# Directive class: Nuwave\Lighthouse\Schema\Directives\EnumDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\EnumDirective
"""
"""
Assign an internal value to an enum key.
Assign an internal value to an enum key.
When dealing with the Enum type in your code,
When dealing with the Enum type in your code,
you will receive the defined value instead of the string key.
you will receive the defined value instead of the string key.
"""
"""
directive @enum(
directive @enum(
"""
"""
The internal value of the enum key.
The internal value of the enum key.
You can use any constant literal value: https://graphql.github.io/graphql-spec/draft/#sec-Input-Values
You can use any constant literal value: https://graphql.github.io/graphql-spec/draft/#sec-Input-Values
"""
"""
value: Mixed
value: Mixed
) on ENUM_VALUE
) on ENUM_VALUE
# Directive class: Nuwave\Lighthouse\Schema\Directives\EqDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\EqDirective
"""
"""
Use the client given value to add an equal conditional to a database query.
Use the client given value to add an equal conditional to a database query.
"""
"""
directive @eq(
directive @eq(
"""
"""
Specify the database column to compare.
Specify the database column to compare.
Only required if database column has a different name than the attribute in your schema.
Only required if database column has a different name than the attribute in your schema.
"""
"""
key: String
key: String
複製
已複製
複製
已複製
)
repeatable
on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION
)
on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\Schema\Directives\EventDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\EventDirective
"""
"""
Dispatch an event after the resolution of a field.
Dispatch an event after the resolution of a field.
The event constructor will be called with a single argument:
The event constructor will be called with a single argument:
the resolved value of the field.
the resolved value of the field.
"""
"""
directive @event(
directive @event(
"""
"""
Specify the fully qualified class name (FQCN) of the event to dispatch.
Specify the fully qualified class name (FQCN) of the event to dispatch.
"""
"""
dispatch: String!
dispatch: String!
複製
已複製
複製
已複製
)
repeatable
on FIELD_DEFINITION
)
on FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\Schema\Directives\FieldDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\FieldDirective
"""
"""
Assign a resolver function to a field.
Assign a resolver function to a field.
"""
"""
directive @field(
directive @field(
"""
"""
A reference to the resolver function to be used.
A reference to the resolver function to be used.
Consists of two parts: a class name and a method name, seperated by an `@` symbol.
Consists of two parts: a class name and a method name, seperated by an `@` symbol.
If you pass only a class name, the method name defaults to `__invoke`.
If you pass only a class name, the method name defaults to `__invoke`.
"""
"""
resolver: String!
resolver: String!
"""
"""
Supply additional data to the resolver.
Supply additional data to the resolver.
"""
"""
args: [String!]
args: [String!]
) on FIELD_DEFINITION
) on FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\Schema\Directives\FindDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\FindDirective
"""
"""
Find a model based on the arguments provided.
Find a model based on the arguments provided.
"""
"""
directive @find(
directive @find(
"""
"""
Specify the class name of the model to use.
Specify the class name of the model to use.
This is only needed when the default model detection does not work.
This is only needed when the default model detection does not work.
"""
"""
model: String
model: String
"""
"""
Apply scopes to the underlying query.
Apply scopes to the underlying query.
"""
"""
scopes: [String!]
scopes: [String!]
) on FIELD_DEFINITION
) on FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\Schema\Directives\FirstDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\FirstDirective
"""
"""
Get the first query result from a collection of Eloquent models.
Get the first query result from a collection of Eloquent models.
"""
"""
directive @first(
directive @first(
"""
"""
Specify the class name of the model to use.
Specify the class name of the model to use.
This is only needed when the default model detection does not work.
This is only needed when the default model detection does not work.
"""
"""
model: String
model: String
"""
"""
Apply scopes to the underlying query.
Apply scopes to the underlying query.
"""
"""
scopes: [String!]
scopes: [String!]
) on FIELD_DEFINITION
) on FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\Schema\Directives\GuardDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\GuardDirective
"""
"""
Run authentication through one or more guards.
Run authentication through one or more guards.
This is run per field and may allow unauthenticated
This is run per field and may allow unauthenticated
users to still receive partial results.
users to still receive partial results.
"""
"""
directive @guard(
directive @guard(
"""
"""
Specify which guards to use, e.g. ["api"].
Specify which guards to use, e.g. ["api"].
When not defined, the default from `lighthouse.php` is used.
When not defined, the default from `lighthouse.php` is used.
"""
"""
with: [String!]
with: [String!]
) on FIELD_DEFINITION | OBJECT
) on FIELD_DEFINITION | OBJECT
# Directive class: Nuwave\Lighthouse\Schema\Directives\HasManyDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\HasManyDirective
"""
"""
Corresponds to [the Eloquent relationship HasMany](https://laravel.com/docs/eloquent-relationships#one-to-many).
Corresponds to [the Eloquent relationship HasMany](https://laravel.com/docs/eloquent-relationships#one-to-many).
"""
"""
directive @hasMany(
directive @hasMany(
"""
"""
Specify the relationship method name in the model class,
Specify the relationship method name in the model class,
if it is named different from the field in the schema.
if it is named different from the field in the schema.
"""
"""
relation: String
relation: String
"""
"""
Apply scopes to the underlying query.
Apply scopes to the underlying query.
"""
"""
scopes: [String!]
scopes: [String!]
"""
"""
Allows to resolve the relation as a paginated list.
Allows to resolve the relation as a paginated list.
Allowed values: `paginator`, `connection`.
Allowed values: `paginator`, `connection`.
"""
"""
type: HasManyType
type: HasManyType
"""
"""
Allow clients to query paginated lists without specifying the amount of items.
Allow clients to query paginated lists without specifying the amount of items.
Overrules the `pagination.default_count` setting from `lighthouse.php`.
Overrules the `pagination.default_count` setting from `lighthouse.php`.
"""
"""
defaultCount: Int
defaultCount: Int
"""
"""
Limit the maximum amount of items that clients can request from paginated lists.
Limit the maximum amount of items that clients can request from paginated lists.
Overrules the `pagination.max_count` setting from `lighthouse.php`.
Overrules the `pagination.max_count` setting from `lighthouse.php`.
"""
"""
maxCount: Int
maxCount: Int
"""
"""
Specify a custom type that implements the Edge interface
Specify a custom type that implements the Edge interface
to extend edge object.
to extend edge object.
Only applies when using Relay style "connection" pagination.
Only applies when using Relay style "connection" pagination.
"""
"""
edgeType: String
edgeType: String
) on FIELD_DEFINITION
) on FIELD_DEFINITION
"""
"""
Options for the `type` argument of `@hasMany`.
Options for the `type` argument of `@hasMany`.
"""
"""
enum HasManyType {
enum HasManyType {
"""
"""
Offset-based pagination, similar to the Laravel default.
Offset-based pagination, similar to the Laravel default.
"""
"""
PAGINATOR
PAGINATOR
"""
"""
Cursor-based pagination, compatible with the Relay specification.
Cursor-based pagination, compatible with the Relay specification.
"""
"""
CONNECTION
CONNECTION
}
}
# Directive class: Nuwave\Lighthouse\Schema\Directives\HasOneDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\HasOneDirective
"""
"""
Corresponds to [the Eloquent relationship HasOne](https://laravel.com/docs/eloquent-relationships#one-to-one).
Corresponds to [the Eloquent relationship HasOne](https://laravel.com/docs/eloquent-relationships#one-to-one).
"""
"""
directive @hasOne(
directive @hasOne(
"""
"""
Specify the relationship method name in the model class,
Specify the relationship method name in the model class,
if it is named different from the field in the schema.
if it is named different from the field in the schema.
"""
"""
relation: String
relation: String
"""
"""
Apply scopes to the underlying query.
Apply scopes to the underlying query.
"""
"""
scopes: [String!]
scopes: [String!]
) on FIELD_DEFINITION
) on FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\Schema\Directives\HashDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\HashDirective
"""
"""
Use Laravel hashing to transform an argument value.
Use Laravel hashing to transform an argument value.
Useful for hashing passwords before inserting them into the database.
Useful for hashing passwords before inserting them into the database.
This uses the default hashing driver defined in `config/hashing.php`.
This uses the default hashing driver defined in `config/hashing.php`.
"""
"""
directive @hash on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION
directive @hash on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\Schema\Directives\InDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\InDirective
"""
"""
Use the client given list value to add an IN conditional to a database query.
Use the client given list value to add an IN conditional to a database query.
"""
"""
directive @in(
directive @in(
"""
"""
Specify the database column to compare.
Specify the database column to compare.
Only required if database column has a different name than the attribute in your schema.
Only required if database column has a different name than the attribute in your schema.
"""
"""
key: String
key: String
複製
已複製
複製
已複製
)
repeatable
on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION
)
on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\Schema\Directives\InjectDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\InjectDirective
"""
"""
Inject a value from the context object into the arguments.
Inject a value from the context object into the arguments.
"""
"""
directive @inject(
directive @inject(
"""
"""
A path to the property of the context that will be injected.
A path to the property of the context that will be injected.
If the value is nested within the context, you may use dot notation
If the value is nested within the context, you may use dot notation
to get it, e.g. "user.id".
to get it, e.g. "user.id".
"""
"""
context: String!
context: String!
"""
"""
The target name of the argument into which the value is injected.
The target name of the argument into which the value is injected.
You can use dot notation to set the value at arbitrary depth
You can use dot notation to set the value at arbitrary depth
within the incoming argument.
within the incoming argument.
"""
"""
name: String!
name: String!
複製
已複製
複製
已複製
)
repeatable
on FIELD_DEFINITION
)
on FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\Schema\Directives\InterfaceDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\InterfaceDirective
"""
"""
Use a custom resolver to determine the concrete type of an interface.
Use a custom resolver to determine the concrete type of an interface.
"""
"""
directive @interface(
directive @interface(
"""
"""
Reference to a custom type-resolver function.
Reference to a custom type-resolver function.
Consists of two parts: a class name and a method name, seperated by an `@` symbol.
Consists of two parts: a class name and a method name, seperated by an `@` symbol.
If you pass only a class name, the method name defaults to `__invoke`.
If you pass only a class name, the method name defaults to `__invoke`.
"""
"""
resolveType: String!
resolveType: String!
) on INTERFACE
) on INTERFACE
# Directive class: Nuwave\Lighthouse\Schema\Directives\LazyLoadDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\LazyLoadDirective
"""
"""
Perform a [lazy eager load](https://laravel.com/docs/eloquent-relationships#lazy-eager-loading)
Perform a [lazy eager load](https://laravel.com/docs/eloquent-relationships#lazy-eager-loading)
on the relations of a list of models.
on the relations of a list of models.
"""
"""
directive @lazyLoad(
directive @lazyLoad(
"""
"""
The names of the relationship methods to load.
The names of the relationship methods to load.
"""
"""
relations: [String!]!
relations: [String!]!
複製
已複製
複製
已複製
)
repeatable
on FIELD_DEFINITION
)
on FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\Schema\Directives\MethodDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\MethodDirective
"""
"""
Resolve a field by calling a method on the parent object.
Resolve a field by calling a method on the parent object.
Use this if the data is not accessible through simple property access or if you
Use this if the data is not accessible through simple property access or if you
want to pass argument to the method.
want to pass argument to the method.
"""
"""
directive @method(
directive @method(
"""
"""
Specify the method of which to fetch the data from.
Specify the method of which to fetch the data from.
Defaults to the name of the field if not given.
Defaults to the name of the field if not given.
"""
"""
name: String
name: String
) on FIELD_DEFINITION
) on FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\Schema\Directives\ModelDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\ModelDirective
"""
"""
Map a model class to an object type.
Map a model class to an object type.
This can be used when the name of the model differs from the name of the type.
This can be used when the name of the model differs from the name of the type.
"""
"""
directive @model(
directive @model(
"""
"""
The class name of the corresponding model.
The class name of the corresponding model.
"""
"""
class: String!
class: String!
) on OBJECT
) on OBJECT
# Directive class: Nuwave\Lighthouse\Schema\Directives\MorphManyDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\MorphManyDirective
"""
"""
Corresponds to [Eloquent's MorphMany-Relationship](https://laravel.com/docs/eloquent-relationships#one-to-many-polymorphic-relations).
Corresponds to [Eloquent's MorphMany-Relationship](https://laravel.com/docs/eloquent-relationships#one-to-many-polymorphic-relations).
"""
"""
directive @morphMany(
directive @morphMany(
"""
"""
Specify the relationship method name in the model class,
Specify the relationship method name in the model class,
if it is named different from the field in the schema.
if it is named different from the field in the schema.
"""
"""
relation: String
relation: String
"""
"""
Apply scopes to the underlying query.
Apply scopes to the underlying query.
"""
"""
scopes: [String!]
scopes: [String!]
"""
"""
Allows to resolve the relation as a paginated list.
Allows to resolve the relation as a paginated list.
"""
"""
type: MorphManyType
type: MorphManyType
"""
"""
Allow clients to query paginated lists without specifying the amount of items.
Allow clients to query paginated lists without specifying the amount of items.
Overrules the `pagination.default_count` setting from `lighthouse.php`.
Overrules the `pagination.default_count` setting from `lighthouse.php`.
"""
"""
defaultCount: Int
defaultCount: Int
"""
"""
Limit the maximum amount of items that clients can request from paginated lists.
Limit the maximum amount of items that clients can request from paginated lists.
Overrules the `pagination.max_count` setting from `lighthouse.php`.
Overrules the `pagination.max_count` setting from `lighthouse.php`.
"""
"""
maxCount: Int
maxCount: Int
"""
"""
Specify a custom type that implements the Edge interface
Specify a custom type that implements the Edge interface
to extend edge object.
to extend edge object.
Only applies when using Relay style "connection" pagination.
Only applies when using Relay style "connection" pagination.
"""
"""
edgeType: String
edgeType: String
) on FIELD_DEFINITION
) on FIELD_DEFINITION
"""
"""
Options for the `type` argument of `@morphMany`.
Options for the `type` argument of `@morphMany`.
"""
"""
enum MorphManyType {
enum MorphManyType {
"""
"""
Offset-based pagination, similar to the Laravel default.
Offset-based pagination, similar to the Laravel default.
"""
"""
PAGINATOR
PAGINATOR
"""
"""
Cursor-based pagination, compatible with the Relay specification.
Cursor-based pagination, compatible with the Relay specification.
"""
"""
CONNECTION
CONNECTION
}
}
# Directive class: Nuwave\Lighthouse\Schema\Directives\MorphOneDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\MorphOneDirective
"""
"""
Corresponds to [Eloquent's MorphOne-Relationship](https://laravel.com/docs/eloquent-relationships#one-to-one-polymorphic-relations).
Corresponds to [Eloquent's MorphOne-Relationship](https://laravel.com/docs/eloquent-relationships#one-to-one-polymorphic-relations).
"""
"""
directive @morphOne(
directive @morphOne(
"""
"""
Specify the relationship method name in the model class,
Specify the relationship method name in the model class,
if it is named different from the field in the schema.
if it is named different from the field in the schema.
"""
"""
relation: String
relation: String
"""
"""
Apply scopes to the underlying query.
Apply scopes to the underlying query.
"""
"""
scopes: [String!]
scopes: [String!]
) on FIELD_DEFINITION
) on FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\Schema\Directives\MorphToDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\MorphToDirective
"""
"""
Corresponds to [Eloquent's MorphTo-Relationship](https://laravel.com/docs/eloquent-relationships#one-to-one-polymorphic-relations).
Corresponds to [Eloquent's MorphTo-Relationship](https://laravel.com/docs/eloquent-relationships#one-to-one-polymorphic-relations).
"""
"""
directive @morphTo(
directive @morphTo(
"""
"""
Specify the relationship method name in the model class,
Specify the relationship method name in the model class,
if it is named different from the field in the schema.
if it is named different from the field in the schema.
"""
"""
relation: String
relation: String
"""
"""
Apply scopes to the underlying query.
Apply scopes to the underlying query.
"""
"""
scopes: [String!]
scopes: [String!]
) on FIELD_DEFINITION
) on FIELD_DEFINITION
# Directive class: Nuwave\Lighthouse\Schema\Directives\MorphToManyDirective
# Directive class: Nuwave\Lighthouse\Schema\Directives\MorphToManyDirective
"""
"""
複製
已複製
複製
已複製
Corresponds to [Eloquent's ManyToMany-Polymorphic-Relationship](https://
l
Corresponds to [Eloquent's ManyToMany-Polymorphic-Relationship](https://
laravel.com/docs/eloquent-relationships#many-to-many-polymorphic-relations).
"""
directive @morphToM
已保存差異
原始文本
開啟檔案
# File generated by "php artisan lighthouse:ide-helper". # Do not edit this file directly. # This file should be ignored by git as it can be autogenerated. # Directive class: Nuwave\Lighthouse\GlobalId\GlobalIdDirective """ Converts between IDs/types and global IDs. When used upon a field, it encodes; when used upon an argument, it decodes. """ directive @globalId( """ Decoding a global id produces a tuple of `$type` and `$id`. This setting controls which of those is passed along. """ decode: GlobalIdDecode = ARRAY ) on FIELD_DEFINITION | INPUT_FIELD_DEFINITION | ARGUMENT_DEFINITION """ Options for the `decode` argument of `@globalId`. """ enum GlobalIdDecode { """ Return an array of `[$type, $id]`. """ ARRAY """ Return just `$type`. """ TYPE """ Return just `$id`. """ ID } # Directive class: Nuwave\Lighthouse\OrderBy\OrderByDirective """ Sort a result list by one or more given columns. """ directive @orderBy( """ Restrict the allowed column names to a well-defined list. This improves introspection capabilities and security. Mutually exclusive with the `columnsEnum` argument. """ columns: [String!] """ Use an existing enumeration type to restrict the allowed columns to a predefined list. This allowes you to re-use the same enum for multiple fields. Mutually exclusive with the `columns` argument. """ columnsEnum: String ) on ARGUMENT_DEFINITION # Directive class: Nuwave\Lighthouse\Pagination\PaginateDirective """ Query multiple model entries as a paginated list. """ directive @paginate( """ Which pagination style should be used. """ type: PaginateType = PAGINATOR """ Specify the class name of the model to use. This is only needed when the default model detection does not work. """ model: String """ Point to a function that provides a Query Builder instance. This replaces the use of a model. """ builder: String """ Apply scopes to the underlying query. """ scopes: [String!] """ Allow clients to query paginated lists without specifying the amount of items. Overrules the `pagination.default_count` setting from `lighthouse.php`. """ defaultCount: Int """ Limit the maximum amount of items that clients can request from paginated lists. Overrules the `pagination.max_count` setting from `lighthouse.php`. """ maxCount: Int ) on FIELD_DEFINITION """ Options for the `type` argument of `@paginate`. """ enum PaginateType { """ Offset-based pagination, similar to the Laravel default. """ PAGINATOR """ Cursor-based pagination, compatible with the Relay specification. """ CONNECTION } # Directive class: Nuwave\Lighthouse\SoftDeletes\ForceDeleteDirective """ Permanently remove one or more soft deleted models by their ID. The field must have a single non-null argument that may be a list. """ directive @forceDelete( """ Set to `true` to use global ids for finding the model. If set to `false`, regular non-global ids are used. """ globalId: Boolean = false """ Specify the class name of the model to use. This is only needed when the default model detection does not work. """ model: String ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\SoftDeletes\RestoreDirective """ Un-delete one or more soft deleted models by their ID. The field must have a single non-null argument that may be a list. """ directive @restore( """ Set to `true` to use global ids for finding the model. If set to `false`, regular non-global ids are used. """ globalId: Boolean = false """ Specify the class name of the model to use. This is only needed when the default model detection does not work. """ model: String ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\SoftDeletes\SoftDeletesDirective """ Allows to filter if trashed elements should be fetched. This manipulates the schema by adding the argument `trashed: Trashed @trashed` to the field. """ directive @softDeletes on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\SoftDeletes\TrashedDirective """ Allows to filter if trashed elements should be fetched. """ directive @trashed on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Validation\RulesDirective """ Validate an argument using [Laravel validation](https://laravel.com/docs/validation). """ directive @rules( """ Specify the validation rules to apply to the field. This can either be a reference to [Laravel's built-in validation rules](https://laravel.com/docs/validation#available-validation-rules), or the fully qualified class name of a custom validation rule. Rules that mutate the incoming arguments, such as `exclude_if`, are not supported by Lighthouse. Use ArgTransformerDirectives or FieldMiddlewareDirectives instead. """ apply: [String!]! """ Specify a custom attribute name to use in your validation message. """ attribute: String """ Specify the messages to return if the validators fail. Specified as an input object that maps rules to messages, e.g. { email: "Must be a valid email", max: "The input was too long" } """ messages: RulesMessageMap ) repeatable on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Validation\RulesForArrayDirective """ Run validation on an array itself, using [Laravel built-in validation](https://laravel.com/docs/validation). """ directive @rulesForArray( """ Specify the validation rules to apply to the field. This can either be a reference to any of Laravel's built-in validation rules: https://laravel.com/docs/validation#available-validation-rules, or the fully qualified class name of a custom validation rule. """ apply: [String!]! """ Specify a custom attribute name to use in your validation message. """ attribute: String """ Specify the messages to return if the validators fail. Specified as an input object that maps rules to messages, e.g. { email: "Must be a valid email", max: "The input was too long" } """ messages: RulesMessageMap ) repeatable on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Validation\ValidateDirective """ Run validation on a field. """ directive @validate on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Validation\ValidatorDirective """ Provide validation rules through a PHP class. """ directive @validator( """ The name of the class to use. If defined on an input, this defaults to a class called `{$inputName}Validator` in the default validator namespace. For fields, it uses the name of the parent type and the field name: `{$parent}{$field}Validator`. """ class: String ) repeatable on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION | FIELD_DEFINITION | INPUT_OBJECT # Directive class: Nuwave\Lighthouse\Tracing\TracingDirective """ Do not use this directive directly, it is automatically added to the schema when using the tracing extension. """ directive @tracing on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\AllDirective """ Fetch all Eloquent models and return the collection as the result. """ directive @all( """ Specify the class name of the model to use. This is only needed when the default model detection does not work. """ model: String """ Apply scopes to the underlying query. """ scopes: [String!] ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\AuthDirective """ Return the currently authenticated user as the result of a query. """ directive @auth( """ Specify which guard to use, e.g. "api". When not defined, the default from `lighthouse.php` is used. """ guard: String ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\BelongsToDirective """ Resolves a field through the Eloquent `BelongsTo` relationship. """ directive @belongsTo( """ Specify the relationship method name in the model class, if it is named different from the field in the schema. """ relation: String """ Apply scopes to the underlying query. """ scopes: [String!] ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\BelongsToManyDirective """ Resolves a field through the Eloquent `BelongsToMany` relationship. """ directive @belongsToMany( """ Specify the relationship method name in the model class, if it is named different from the field in the schema. """ relation: String """ Apply scopes to the underlying query. """ scopes: [String!] """ Allows to resolve the relation as a paginated list. """ type: BelongsToManyType """ Allow clients to query paginated lists without specifying the amount of items. Overrules the `pagination.default_count` setting from `lighthouse.php`. """ defaultCount: Int """ Limit the maximum amount of items that clients can request from paginated lists. Overrules the `pagination.max_count` setting from `lighthouse.php`. """ maxCount: Int """ Specify a custom type that implements the Edge interface to extend edge object. Only applies when using Relay style "connection" pagination. """ edgeType: String ) on FIELD_DEFINITION """ Options for the `type` argument of `@belongsToMany`. """ enum PaginateType { """ Offset-based pagination, similar to the Laravel default. """ PAGINATOR """ Cursor-based pagination, compatible with the Relay specification. """ CONNECTION } # Directive class: Nuwave\Lighthouse\Schema\Directives\BroadcastDirective """ Broadcast the results of a mutation to subscribed clients. """ directive @broadcast( """ Name of the subscription that should be retriggered as a result of this operation. """ subscription: String! """ Specify whether or not the job should be queued. This defaults to the global config option `lighthouse.subscriptions.queue_broadcasts`. """ shouldQueue: Boolean ) repeatable on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\BuilderDirective """ Use an argument to modify the query builder for a field. """ directive @builder( """ Reference a method that is passed the query builder. Consists of two parts: a class name and a method name, separated by an `@` symbol. If you pass only a class name, the method name defaults to `__invoke`. """ method: String! ) repeatable on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\CacheDirective """ Cache the result of a resolver. """ directive @cache( """ Set the duration it takes for the cache to expire in seconds. If not given, the result will be stored forever. """ maxAge: Int """ Limit access to cached data to the currently authenticated user. When the field is accessible by guest users, this will not have any effect, they will access a shared cache. """ private: Boolean = false ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\CacheKeyDirective """ Specify the field to use as a key when creating a cache. """ directive @cacheKey on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\CanDirective """ Check a Laravel Policy to ensure the current user is authorized to access a field. When `injectArgs` and `args` are used together, the client given arguments will be passed before the static args. """ directive @can( """ The ability to check permissions for. """ ability: String! """ If your policy checks against specific model instances, specify the name of the field argument that contains its primary key(s). You may pass the string in dot notation to use nested inputs. """ find: String """ Specify the class name of the model to use. This is only needed when the default model detection does not work. """ model: String """ Pass along the client given input data as arguments to `Gate::check`. """ injectArgs: Boolean = false """ Statically defined arguments that are passed to `Gate::check`. You may pass pass arbitrary GraphQL literals, e.g.: [1, 2, 3] or { foo: "bar" } """ args: Mixed ) repeatable on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\ComplexityDirective """ Customize the calculation of a fields complexity score before execution. """ directive @complexity( """ Reference a function to customize the complexity score calculation. Consists of two parts: a class name and a method name, seperated by an `@` symbol. If you pass only a class name, the method name defaults to `__invoke`. """ resolver: String ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\CountDirective """ Returns the count of a given relationship or model. """ directive @count( """ The relationship which you want to run the count on. """ relation: String """ The model to run the count on. """ model: String """ Apply scopes to the underlying query. """ scopes: [String!] ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\CreateDirective """ Create a new Eloquent model with the given arguments. """ directive @create( """ Specify the class name of the model to use. This is only needed when the default model detection does not work. """ model: String """ Specify the name of the relation on the parent model. This is only needed when using this directive as a nested arg resolver and if the name of the relation is not the arg name. """ relation: String ) on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\DeleteDirective """ Delete one or more models by their ID. The field must have a single non-null argument that may be a list. """ directive @delete( """ Set to `true` to use global ids for finding the model. If set to `false`, regular non-global ids are used. """ globalId: Boolean = false """ Specify the class name of the model to use. This is only needed when the default model detection does not work. """ model: String """ Specify the name of the relation on the parent model. This is only needed when using this directive as a nested arg resolver and if the name of the relation is not the arg name. """ relation: String ) on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\DeprecatedDirective """ Marks an element of a GraphQL schema as no longer supported. """ directive @deprecated( """ Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted in [Markdown](https://daringfireball.net/projects/markdown/). """ reason: String = "No longer supported" ) on FIELD_DEFINITION | ENUM_VALUE # Directive class: Nuwave\Lighthouse\Schema\Directives\EnumDirective """ Assign an internal value to an enum key. When dealing with the Enum type in your code, you will receive the defined value instead of the string key. """ directive @enum( """ The internal value of the enum key. You can use any constant literal value: https://graphql.github.io/graphql-spec/draft/#sec-Input-Values """ value: Mixed ) on ENUM_VALUE # Directive class: Nuwave\Lighthouse\Schema\Directives\EqDirective """ Use the client given value to add an equal conditional to a database query. """ directive @eq( """ Specify the database column to compare. Only required if database column has a different name than the attribute in your schema. """ key: String ) repeatable on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\EventDirective """ Dispatch an event after the resolution of a field. The event constructor will be called with a single argument: the resolved value of the field. """ directive @event( """ Specify the fully qualified class name (FQCN) of the event to dispatch. """ dispatch: String! ) repeatable on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\FieldDirective """ Assign a resolver function to a field. """ directive @field( """ A reference to the resolver function to be used. Consists of two parts: a class name and a method name, seperated by an `@` symbol. If you pass only a class name, the method name defaults to `__invoke`. """ resolver: String! """ Supply additional data to the resolver. """ args: [String!] ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\FindDirective """ Find a model based on the arguments provided. """ directive @find( """ Specify the class name of the model to use. This is only needed when the default model detection does not work. """ model: String """ Apply scopes to the underlying query. """ scopes: [String!] ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\FirstDirective """ Get the first query result from a collection of Eloquent models. """ directive @first( """ Specify the class name of the model to use. This is only needed when the default model detection does not work. """ model: String """ Apply scopes to the underlying query. """ scopes: [String!] ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\GuardDirective """ Run authentication through one or more guards. This is run per field and may allow unauthenticated users to still receive partial results. """ directive @guard( """ Specify which guards to use, e.g. ["api"]. When not defined, the default from `lighthouse.php` is used. """ with: [String!] ) on FIELD_DEFINITION | OBJECT # Directive class: Nuwave\Lighthouse\Schema\Directives\HasManyDirective """ Corresponds to [the Eloquent relationship HasMany](https://laravel.com/docs/eloquent-relationships#one-to-many). """ directive @hasMany( """ Specify the relationship method name in the model class, if it is named different from the field in the schema. """ relation: String """ Apply scopes to the underlying query. """ scopes: [String!] """ Allows to resolve the relation as a paginated list. Allowed values: `paginator`, `connection`. """ type: HasManyType """ Allow clients to query paginated lists without specifying the amount of items. Overrules the `pagination.default_count` setting from `lighthouse.php`. """ defaultCount: Int """ Limit the maximum amount of items that clients can request from paginated lists. Overrules the `pagination.max_count` setting from `lighthouse.php`. """ maxCount: Int """ Specify a custom type that implements the Edge interface to extend edge object. Only applies when using Relay style "connection" pagination. """ edgeType: String ) on FIELD_DEFINITION """ Options for the `type` argument of `@hasMany`. """ enum HasManyType { """ Offset-based pagination, similar to the Laravel default. """ PAGINATOR """ Cursor-based pagination, compatible with the Relay specification. """ CONNECTION } # Directive class: Nuwave\Lighthouse\Schema\Directives\HasOneDirective """ Corresponds to [the Eloquent relationship HasOne](https://laravel.com/docs/eloquent-relationships#one-to-one). """ directive @hasOne( """ Specify the relationship method name in the model class, if it is named different from the field in the schema. """ relation: String """ Apply scopes to the underlying query. """ scopes: [String!] ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\HashDirective """ Use Laravel hashing to transform an argument value. Useful for hashing passwords before inserting them into the database. This uses the default hashing driver defined in `config/hashing.php`. """ directive @hash on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\InDirective """ Use the client given list value to add an IN conditional to a database query. """ directive @in( """ Specify the database column to compare. Only required if database column has a different name than the attribute in your schema. """ key: String ) repeatable on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\InjectDirective """ Inject a value from the context object into the arguments. """ directive @inject( """ A path to the property of the context that will be injected. If the value is nested within the context, you may use dot notation to get it, e.g. "user.id". """ context: String! """ The target name of the argument into which the value is injected. You can use dot notation to set the value at arbitrary depth within the incoming argument. """ name: String! ) repeatable on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\InterfaceDirective """ Use a custom resolver to determine the concrete type of an interface. """ directive @interface( """ Reference to a custom type-resolver function. Consists of two parts: a class name and a method name, seperated by an `@` symbol. If you pass only a class name, the method name defaults to `__invoke`. """ resolveType: String! ) on INTERFACE # Directive class: Nuwave\Lighthouse\Schema\Directives\LazyLoadDirective """ Perform a [lazy eager load](https://laravel.com/docs/eloquent-relationships#lazy-eager-loading) on the relations of a list of models. """ directive @lazyLoad( """ The names of the relationship methods to load. """ relations: [String!]! ) repeatable on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\MethodDirective """ Resolve a field by calling a method on the parent object. Use this if the data is not accessible through simple property access or if you want to pass argument to the method. """ directive @method( """ Specify the method of which to fetch the data from. Defaults to the name of the field if not given. """ name: String ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\ModelDirective """ Map a model class to an object type. This can be used when the name of the model differs from the name of the type. """ directive @model( """ The class name of the corresponding model. """ class: String! ) on OBJECT # Directive class: Nuwave\Lighthouse\Schema\Directives\MorphManyDirective """ Corresponds to [Eloquent's MorphMany-Relationship](https://laravel.com/docs/eloquent-relationships#one-to-many-polymorphic-relations). """ directive @morphMany( """ Specify the relationship method name in the model class, if it is named different from the field in the schema. """ relation: String """ Apply scopes to the underlying query. """ scopes: [String!] """ Allows to resolve the relation as a paginated list. """ type: MorphManyType """ Allow clients to query paginated lists without specifying the amount of items. Overrules the `pagination.default_count` setting from `lighthouse.php`. """ defaultCount: Int """ Limit the maximum amount of items that clients can request from paginated lists. Overrules the `pagination.max_count` setting from `lighthouse.php`. """ maxCount: Int """ Specify a custom type that implements the Edge interface to extend edge object. Only applies when using Relay style "connection" pagination. """ edgeType: String ) on FIELD_DEFINITION """ Options for the `type` argument of `@morphMany`. """ enum MorphManyType { """ Offset-based pagination, similar to the Laravel default. """ PAGINATOR """ Cursor-based pagination, compatible with the Relay specification. """ CONNECTION } # Directive class: Nuwave\Lighthouse\Schema\Directives\MorphOneDirective """ Corresponds to [Eloquent's MorphOne-Relationship](https://laravel.com/docs/eloquent-relationships#one-to-one-polymorphic-relations). """ directive @morphOne( """ Specify the relationship method name in the model class, if it is named different from the field in the schema. """ relation: String """ Apply scopes to the underlying query. """ scopes: [String!] ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\MorphToDirective """ Corresponds to [Eloquent's MorphTo-Relationship](https://laravel.com/docs/eloquent-relationships#one-to-one-polymorphic-relations). """ directive @morphTo( """ Specify the relationship method name in the model class, if it is named different from the field in the schema. """ relation: String """ Apply scopes to the underlying query. """ scopes: [String!] ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\MorphToManyDirective """ Corresponds to [Eloquent's ManyToMany-Polymorphic-Relationship](https://laravel.com/docs/eloquent-relationships#many-to-many-polymorphic-relations). """ directive @morphToMany( """ Specify the relationship method name in the model class, if it is named different from the field in the schema. """ relation: String """ Apply scopes to the underlying query. """ scopes: [String!] ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\NamespaceDirective """ Redefine the default namespaces used in other directives. The arguments are a map from directive names to namespaces. """ directive @namespace on FIELD_DEFINITION | OBJECT # Directive class: Nuwave\Lighthouse\Schema\Directives\NeqDirective """ Use the client given value to add an not-equal conditional to a database query. """ directive @neq( """ Specify the database column to compare. Only required if database column has a different name than the attribute in your schema. """ key: String ) repeatable on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\NestDirective """ A no-op nested arg resolver that delegates all calls to the ArgResolver directives attached to the children. """ directive @nest on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\NodeDirective """ Register a type for Relay's global object identification. When used without any arguments, Lighthouse will attempt to resolve the type through a model with the same name. """ directive @node( """ Reference to a function that receives the decoded `id` and returns a result. Consists of two parts: a class name and a method name, seperated by an `@` symbol. If you pass only a class name, the method name defaults to `__invoke`. """ resolver: String """ Specify the class name of the model to use. This is only needed when the default model detection does not work. """ model: String ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\NotInDirective """ Use the client given value to add a NOT IN conditional to a database query. """ directive @notIn( """ Specify the database column to compare. Only required if database column has a different name than the attribute in your schema. """ key: String ) repeatable on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\RenameArgsDirective """ Apply the @rename directives on the incoming arguments. """ directive @renameArgs on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\RenameDirective """ Change the internally used name of a field or argument. This does not change the schema from a client perspective. """ directive @rename( """ The internal name of an attribute/property/key. """ attribute: String! ) on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\SanitizeDirective """ Apply sanitization to the arguments of a field. """ directive @sanitize on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\ScalarDirective """ Reference a class implementing a scalar definition. """ directive @scalar( """ Reference to a class that extends `\GraphQL\Type\Definition\ScalarType`. """ class: String! ) on SCALAR # Directive class: Nuwave\Lighthouse\Schema\Directives\ScopeDirective """ Adds a scope to the query builder. The scope method will receive the client-given value of the argument as the second parameter. """ directive @scope( """ The name of the scope. """ name: String! ) repeatable on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\SearchDirective """ Perform a full-text search by the given input value. """ directive @search( """ Specify a custom index to use for search. """ within: String ) on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\SpreadDirective """ Merge the fields of a nested input object into the arguments of its parent when processing the field arguments given by a client. """ directive @spread on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\SubscriptionDirective """ Reference a class to handle the broadcasting of a subscription to clients. The given class must extend `\Nuwave\Lighthouse\Schema\Types\GraphQLSubscription`. """ directive @subscription( """ A reference to a subclass of `\Nuwave\Lighthouse\Schema\Types\GraphQLSubscription`. """ class: String! ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\TransformArgsDirective """ Transform the arguments of a field. """ directive @transformArgs on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\TrimDirective """ Remove whitespace from the beginning and end of a given input. This can be used on: - a single argument or input field to sanitize that subtree - a field to trim all strings """ directive @trim on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION | FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\UnionDirective """ Use a custom function to determine the concrete type of unions. """ directive @union( """ Reference a function that returns the implementing Object Type. Consists of two parts: a class name and a method name, seperated by an `@` symbol. If you pass only a class name, the method name defaults to `__invoke`. """ resolveType: String! ) on UNION # Directive class: Nuwave\Lighthouse\Schema\Directives\UpdateDirective """ Update an Eloquent model with the input values of the field. """ directive @update( """ Specify the class name of the model to use. This is only needed when the default model detection does not work. """ model: String """ Set to `true` to use global ids for finding the model. If set to `false`, regular non-global ids are used. """ globalId: Boolean = false """ Specify the name of the relation on the parent model. This is only needed when using this directive as a nested arg resolver and if the name of the relation is not the arg name. """ relation: String ) on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\UpsertDirective """ Create or update an Eloquent model with the input values of the field. """ directive @upsert( """ Specify the class name of the model to use. This is only needed when the default model detection does not work. """ model: String """ Set to `true` to use global ids for finding the model. If set to `false`, regular non-global ids are used. """ globalId: Boolean = false """ Specify the name of the relation on the parent model. This is only needed when using this directive as a nested arg resolver and if the name of the relation is not the arg name. """ relation: String ) on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\WhereAuthDirective """ Filter a type to only return instances owned by the current user. """ directive @whereAuth( """ Name of the relationship that links to the user model. """ relation: String! """ Specify which guard to use, e.g. "api". When not defined, the default from `lighthouse.php` is used. """ guard: String ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\WhereBetweenDirective """ Verify that a column's value is between two values. The type of the input value this is defined upon should be an `input` object with two fields. """ directive @whereBetween( """ Specify the database column to compare. Only required if database column has a different name than the attribute in your schema. """ key: String ) repeatable on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\WhereDirective """ Use an input value as a [where filter](https://laravel.com/docs/queries#where-clauses). """ directive @where( """ Specify the operator to use within the WHERE condition. """ operator: String = "=" """ Specify the database column to compare. Only required if database column has a different name than the attribute in your schema. """ key: String """ Use Laravel's where clauses upon the query builder. """ clause: String ) repeatable on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\WhereJsonContainsDirective """ Use an input value as a [whereJsonContains filter](https://laravel.com/docs/queries#json-where-clauses). """ directive @whereJsonContains( """ Specify the database column and path inside the JSON to compare. Only required if database column has a different name than the attribute in your schema. """ key: String ) repeatable on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\WhereNotBetweenDirective """ Verify that a column's value lies outside of two values. The type of the input value this is defined upon should be an `input` object with two fields. """ directive @whereNotBetween( """ Specify the database column to compare. Only required if database column has a different name than the attribute in your schema. """ key: String ) repeatable on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\WithCountDirective """ Eager-load the count of an Eloquent relation if the field is queried. Note that this does not return a value for the field, the count is simply prefetched, assuming it is used to compute the field value. Use `@count` if the field should simply return the relation count. """ directive @withCount( """ Specify the relationship method name in the model class. """ relation: String! """ Apply scopes to the underlying query. """ scopes: [String!] ) repeatable on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\WithDirective """ Eager-load an Eloquent relation. """ directive @with( """ Specify the relationship method name in the model class, if it is named different from the field in the schema. """ relation: String """ Apply scopes to the underlying query. """ scopes: [String!] ) repeatable on FIELD_DEFINITION
更改後文本
開啟檔案
# File generated by "php artisan lighthouse:ide-helper". # Do not edit this file directly. # This file should be ignored by git as it can be autogenerated. # Directive class: Nuwave\Lighthouse\GlobalId\GlobalIdDirective # Base types, required for extending. type Query {} type Mutation {} type Subscription {} # Missing type & input definitions input Map { key: String! value: String! } input RulesMessageMap { rules: [Map] } input BelongsToManyType { type: String! } input Mixed { input: [String] } """ Converts between IDs/types and global IDs. When used upon a field, it encodes; when used upon an argument, it decodes. """ directive @globalId( """ Decoding a global id produces a tuple of `$type` and `$id`. This setting controls which of those is passed along. """ decode: GlobalIdDecode = ARRAY ) on FIELD_DEFINITION | INPUT_FIELD_DEFINITION | ARGUMENT_DEFINITION """ Options for the `decode` argument of `@globalId`. """ enum GlobalIdDecode { """ Return an array of `[$type, $id]`. """ ARRAY """ Return just `$type`. """ TYPE """ Return just `$id`. """ ID } # Directive class: Nuwave\Lighthouse\OrderBy\OrderByDirective """ Sort a result list by one or more given columns. """ directive @orderBy( """ Restrict the allowed column names to a well-defined list. This improves introspection capabilities and security. Mutually exclusive with the `columnsEnum` argument. """ columns: [String!] """ Use an existing enumeration type to restrict the allowed columns to a predefined list. This allowes you to re-use the same enum for multiple fields. Mutually exclusive with the `columns` argument. """ columnsEnum: String ) on ARGUMENT_DEFINITION # Directive class: Nuwave\Lighthouse\Pagination\PaginateDirective """ Query multiple model entries as a paginated list. """ directive @paginate( """ Which pagination style should be used. """ type: PaginateType = PAGINATOR """ Specify the class name of the model to use. This is only needed when the default model detection does not work. """ model: String """ Point to a function that provides a Query Builder instance. This replaces the use of a model. """ builder: String """ Apply scopes to the underlying query. """ scopes: [String!] """ Allow clients to query paginated lists without specifying the amount of items. Overrules the `pagination.default_count` setting from `lighthouse.php`. """ defaultCount: Int """ Limit the maximum amount of items that clients can request from paginated lists. Overrules the `pagination.max_count` setting from `lighthouse.php`. """ maxCount: Int ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\SoftDeletes\ForceDeleteDirective """ Permanently remove one or more soft deleted models by their ID. The field must have a single non-null argument that may be a list. """ directive @forceDelete( """ Set to `true` to use global ids for finding the model. If set to `false`, regular non-global ids are used. """ globalId: Boolean = false """ Specify the class name of the model to use. This is only needed when the default model detection does not work. """ model: String ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\SoftDeletes\RestoreDirective """ Un-delete one or more soft deleted models by their ID. The field must have a single non-null argument that may be a list. """ directive @restore( """ Set to `true` to use global ids for finding the model. If set to `false`, regular non-global ids are used. """ globalId: Boolean = false """ Specify the class name of the model to use. This is only needed when the default model detection does not work. """ model: String ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\SoftDeletes\SoftDeletesDirective """ Allows to filter if trashed elements should be fetched. This manipulates the schema by adding the argument `trashed: Trashed @trashed` to the field. """ directive @softDeletes on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\SoftDeletes\TrashedDirective """ Allows to filter if trashed elements should be fetched. """ directive @trashed on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Validation\RulesDirective """ Validate an argument using [Laravel validation](https://laravel.com/docs/validation). """ directive @rules( """ Specify the validation rules to apply to the field. This can either be a reference to [Laravel's built-in validation rules](https://laravel.com/docs/validation#available-validation-rules), or the fully qualified class name of a custom validation rule. Rules that mutate the incoming arguments, such as `exclude_if`, are not supported by Lighthouse. Use ArgTransformerDirectives or FieldMiddlewareDirectives instead. """ apply: [String!]! """ Specify a custom attribute name to use in your validation message. """ attribute: String """ Specify the messages to return if the validators fail. Specified as an input object that maps rules to messages, e.g. { email: "Must be a valid email", max: "The input was too long" } """ messages: RulesMessageMap ) on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Validation\RulesForArrayDirective """ Run validation on an array itself, using [Laravel built-in validation](https://laravel.com/docs/validation). """ directive @rulesForArray( """ Specify the validation rules to apply to the field. This can either be a reference to any of Laravel's built-in validation rules: https://laravel.com/docs/validation#available-validation-rules, or the fully qualified class name of a custom validation rule. """ apply: [String!]! """ Specify a custom attribute name to use in your validation message. """ attribute: String """ Specify the messages to return if the validators fail. Specified as an input object that maps rules to messages, e.g. { email: "Must be a valid email", max: "The input was too long" } """ messages: RulesMessageMap ) on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Validation\ValidateDirective """ Run validation on a field. """ directive @validate on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Validation\ValidatorDirective """ Provide validation rules through a PHP class. """ directive @validator( """ The name of the class to use. If defined on an input, this defaults to a class called `{$inputName}Validator` in the default validator namespace. For fields, it uses the name of the parent type and the field name: `{$parent}{$field}Validator`. """ class: String ) on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION | FIELD_DEFINITION | INPUT_OBJECT # Directive class: Nuwave\Lighthouse\Tracing\TracingDirective """ Do not use this directive directly, it is automatically added to the schema when using the tracing extension. """ directive @tracing on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\AllDirective """ Fetch all Eloquent models and return the collection as the result. """ directive @all( """ Specify the class name of the model to use. This is only needed when the default model detection does not work. """ model: String """ Apply scopes to the underlying query. """ scopes: [String!] ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\AuthDirective """ Return the currently authenticated user as the result of a query. """ directive @auth( """ Specify which guard to use, e.g. "api". When not defined, the default from `lighthouse.php` is used. """ guard: String ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\BelongsToDirective """ Resolves a field through the Eloquent `BelongsTo` relationship. """ directive @belongsTo( """ Specify the relationship method name in the model class, if it is named different from the field in the schema. """ relation: String """ Apply scopes to the underlying query. """ scopes: [String!] ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\BelongsToManyDirective """ Resolves a field through the Eloquent `BelongsToMany` relationship. """ directive @belongsToMany( """ Specify the relationship method name in the model class, if it is named different from the field in the schema. """ relation: String """ Apply scopes to the underlying query. """ scopes: [String!] """ Allows to resolve the relation as a paginated list. """ type: BelongsToManyType """ Allow clients to query paginated lists without specifying the amount of items. Overrules the `pagination.default_count` setting from `lighthouse.php`. """ defaultCount: Int """ Limit the maximum amount of items that clients can request from paginated lists. Overrules the `pagination.max_count` setting from `lighthouse.php`. """ maxCount: Int """ Specify a custom type that implements the Edge interface to extend edge object. Only applies when using Relay style "connection" pagination. """ edgeType: String ) on FIELD_DEFINITION """ Options for the `type` argument of `@belongsToMany`. """ enum PaginateType { """ Offset-based pagination, similar to the Laravel default. """ PAGINATOR """ Cursor-based pagination, compatible with the Relay specification. """ CONNECTION } # Directive class: Nuwave\Lighthouse\Schema\Directives\BroadcastDirective """ Broadcast the results of a mutation to subscribed clients. """ directive @broadcast( """ Name of the subscription that should be retriggered as a result of this operation. """ subscription: String! """ Specify whether or not the job should be queued. This defaults to the global config option `lighthouse.subscriptions.queue_broadcasts`. """ shouldQueue: Boolean ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\BuilderDirective """ Use an argument to modify the query builder for a field. """ directive @builder( """ Reference a method that is passed the query builder. Consists of two parts: a class name and a method name, separated by an `@` symbol. If you pass only a class name, the method name defaults to `__invoke`. """ method: String! ) on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\CacheDirective """ Cache the result of a resolver. """ directive @cache( """ Set the duration it takes for the cache to expire in seconds. If not given, the result will be stored forever. """ maxAge: Int """ Limit access to cached data to the currently authenticated user. When the field is accessible by guest users, this will not have any effect, they will access a shared cache. """ private: Boolean = false ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\CacheKeyDirective """ Specify the field to use as a key when creating a cache. """ directive @cacheKey on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\CanDirective """ Check a Laravel Policy to ensure the current user is authorized to access a field. When `injectArgs` and `args` are used together, the client given arguments will be passed before the static args. """ directive @can( """ The ability to check permissions for. """ ability: String! """ If your policy checks against specific model instances, specify the name of the field argument that contains its primary key(s). You may pass the string in dot notation to use nested inputs. """ find: String """ Specify the class name of the model to use. This is only needed when the default model detection does not work. """ model: String """ Pass along the client given input data as arguments to `Gate::check`. """ injectArgs: Boolean = false """ Statically defined arguments that are passed to `Gate::check`. You may pass pass arbitrary GraphQL literals, e.g.: [1, 2, 3] or { foo: "bar" } """ args: Mixed ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\ComplexityDirective """ Customize the calculation of a fields complexity score before execution. """ directive @complexity( """ Reference a function to customize the complexity score calculation. Consists of two parts: a class name and a method name, seperated by an `@` symbol. If you pass only a class name, the method name defaults to `__invoke`. """ resolver: String ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\CountDirective """ Returns the count of a given relationship or model. """ directive @count( """ The relationship which you want to run the count on. """ relation: String """ The model to run the count on. """ model: String """ Apply scopes to the underlying query. """ scopes: [String!] ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\CreateDirective """ Create a new Eloquent model with the given arguments. """ directive @create( """ Specify the class name of the model to use. This is only needed when the default model detection does not work. """ model: String """ Specify the name of the relation on the parent model. This is only needed when using this directive as a nested arg resolver and if the name of the relation is not the arg name. """ relation: String ) on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\DeleteDirective """ Delete one or more models by their ID. The field must have a single non-null argument that may be a list. """ directive @delete( """ Set to `true` to use global ids for finding the model. If set to `false`, regular non-global ids are used. """ globalId: Boolean = false """ Specify the class name of the model to use. This is only needed when the default model detection does not work. """ model: String """ Specify the name of the relation on the parent model. This is only needed when using this directive as a nested arg resolver and if the name of the relation is not the arg name. """ relation: String ) on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\DeprecatedDirective """ Marks an element of a GraphQL schema as no longer supported. """ directive @deprecated( """ Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted in [Markdown](https://daringfireball.net/projects/markdown/). """ reason: String = "No longer supported" ) on FIELD_DEFINITION | ENUM_VALUE # Directive class: Nuwave\Lighthouse\Schema\Directives\EnumDirective """ Assign an internal value to an enum key. When dealing with the Enum type in your code, you will receive the defined value instead of the string key. """ directive @enum( """ The internal value of the enum key. You can use any constant literal value: https://graphql.github.io/graphql-spec/draft/#sec-Input-Values """ value: Mixed ) on ENUM_VALUE # Directive class: Nuwave\Lighthouse\Schema\Directives\EqDirective """ Use the client given value to add an equal conditional to a database query. """ directive @eq( """ Specify the database column to compare. Only required if database column has a different name than the attribute in your schema. """ key: String ) on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\EventDirective """ Dispatch an event after the resolution of a field. The event constructor will be called with a single argument: the resolved value of the field. """ directive @event( """ Specify the fully qualified class name (FQCN) of the event to dispatch. """ dispatch: String! ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\FieldDirective """ Assign a resolver function to a field. """ directive @field( """ A reference to the resolver function to be used. Consists of two parts: a class name and a method name, seperated by an `@` symbol. If you pass only a class name, the method name defaults to `__invoke`. """ resolver: String! """ Supply additional data to the resolver. """ args: [String!] ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\FindDirective """ Find a model based on the arguments provided. """ directive @find( """ Specify the class name of the model to use. This is only needed when the default model detection does not work. """ model: String """ Apply scopes to the underlying query. """ scopes: [String!] ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\FirstDirective """ Get the first query result from a collection of Eloquent models. """ directive @first( """ Specify the class name of the model to use. This is only needed when the default model detection does not work. """ model: String """ Apply scopes to the underlying query. """ scopes: [String!] ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\GuardDirective """ Run authentication through one or more guards. This is run per field and may allow unauthenticated users to still receive partial results. """ directive @guard( """ Specify which guards to use, e.g. ["api"]. When not defined, the default from `lighthouse.php` is used. """ with: [String!] ) on FIELD_DEFINITION | OBJECT # Directive class: Nuwave\Lighthouse\Schema\Directives\HasManyDirective """ Corresponds to [the Eloquent relationship HasMany](https://laravel.com/docs/eloquent-relationships#one-to-many). """ directive @hasMany( """ Specify the relationship method name in the model class, if it is named different from the field in the schema. """ relation: String """ Apply scopes to the underlying query. """ scopes: [String!] """ Allows to resolve the relation as a paginated list. Allowed values: `paginator`, `connection`. """ type: HasManyType """ Allow clients to query paginated lists without specifying the amount of items. Overrules the `pagination.default_count` setting from `lighthouse.php`. """ defaultCount: Int """ Limit the maximum amount of items that clients can request from paginated lists. Overrules the `pagination.max_count` setting from `lighthouse.php`. """ maxCount: Int """ Specify a custom type that implements the Edge interface to extend edge object. Only applies when using Relay style "connection" pagination. """ edgeType: String ) on FIELD_DEFINITION """ Options for the `type` argument of `@hasMany`. """ enum HasManyType { """ Offset-based pagination, similar to the Laravel default. """ PAGINATOR """ Cursor-based pagination, compatible with the Relay specification. """ CONNECTION } # Directive class: Nuwave\Lighthouse\Schema\Directives\HasOneDirective """ Corresponds to [the Eloquent relationship HasOne](https://laravel.com/docs/eloquent-relationships#one-to-one). """ directive @hasOne( """ Specify the relationship method name in the model class, if it is named different from the field in the schema. """ relation: String """ Apply scopes to the underlying query. """ scopes: [String!] ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\HashDirective """ Use Laravel hashing to transform an argument value. Useful for hashing passwords before inserting them into the database. This uses the default hashing driver defined in `config/hashing.php`. """ directive @hash on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\InDirective """ Use the client given list value to add an IN conditional to a database query. """ directive @in( """ Specify the database column to compare. Only required if database column has a different name than the attribute in your schema. """ key: String ) on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\InjectDirective """ Inject a value from the context object into the arguments. """ directive @inject( """ A path to the property of the context that will be injected. If the value is nested within the context, you may use dot notation to get it, e.g. "user.id". """ context: String! """ The target name of the argument into which the value is injected. You can use dot notation to set the value at arbitrary depth within the incoming argument. """ name: String! ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\InterfaceDirective """ Use a custom resolver to determine the concrete type of an interface. """ directive @interface( """ Reference to a custom type-resolver function. Consists of two parts: a class name and a method name, seperated by an `@` symbol. If you pass only a class name, the method name defaults to `__invoke`. """ resolveType: String! ) on INTERFACE # Directive class: Nuwave\Lighthouse\Schema\Directives\LazyLoadDirective """ Perform a [lazy eager load](https://laravel.com/docs/eloquent-relationships#lazy-eager-loading) on the relations of a list of models. """ directive @lazyLoad( """ The names of the relationship methods to load. """ relations: [String!]! ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\MethodDirective """ Resolve a field by calling a method on the parent object. Use this if the data is not accessible through simple property access or if you want to pass argument to the method. """ directive @method( """ Specify the method of which to fetch the data from. Defaults to the name of the field if not given. """ name: String ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\ModelDirective """ Map a model class to an object type. This can be used when the name of the model differs from the name of the type. """ directive @model( """ The class name of the corresponding model. """ class: String! ) on OBJECT # Directive class: Nuwave\Lighthouse\Schema\Directives\MorphManyDirective """ Corresponds to [Eloquent's MorphMany-Relationship](https://laravel.com/docs/eloquent-relationships#one-to-many-polymorphic-relations). """ directive @morphMany( """ Specify the relationship method name in the model class, if it is named different from the field in the schema. """ relation: String """ Apply scopes to the underlying query. """ scopes: [String!] """ Allows to resolve the relation as a paginated list. """ type: MorphManyType """ Allow clients to query paginated lists without specifying the amount of items. Overrules the `pagination.default_count` setting from `lighthouse.php`. """ defaultCount: Int """ Limit the maximum amount of items that clients can request from paginated lists. Overrules the `pagination.max_count` setting from `lighthouse.php`. """ maxCount: Int """ Specify a custom type that implements the Edge interface to extend edge object. Only applies when using Relay style "connection" pagination. """ edgeType: String ) on FIELD_DEFINITION """ Options for the `type` argument of `@morphMany`. """ enum MorphManyType { """ Offset-based pagination, similar to the Laravel default. """ PAGINATOR """ Cursor-based pagination, compatible with the Relay specification. """ CONNECTION } # Directive class: Nuwave\Lighthouse\Schema\Directives\MorphOneDirective """ Corresponds to [Eloquent's MorphOne-Relationship](https://laravel.com/docs/eloquent-relationships#one-to-one-polymorphic-relations). """ directive @morphOne( """ Specify the relationship method name in the model class, if it is named different from the field in the schema. """ relation: String """ Apply scopes to the underlying query. """ scopes: [String!] ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\MorphToDirective """ Corresponds to [Eloquent's MorphTo-Relationship](https://laravel.com/docs/eloquent-relationships#one-to-one-polymorphic-relations). """ directive @morphTo( """ Specify the relationship method name in the model class, if it is named different from the field in the schema. """ relation: String """ Apply scopes to the underlying query. """ scopes: [String!] ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\MorphToManyDirective """ Corresponds to [Eloquent's ManyToMany-Polymorphic-Relationship](https://laravel.com/docs/eloquent-relationships#many-to-many-polymorphic-relations). """ directive @morphToMany( """ Specify the relationship method name in the model class, if it is named different from the field in the schema. """ relation: String """ Apply scopes to the underlying query. """ scopes: [String!] ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\NamespaceDirective """ Redefine the default namespaces used in other directives. The arguments are a map from directive names to namespaces. """ directive @namespace on FIELD_DEFINITION | OBJECT # Directive class: Nuwave\Lighthouse\Schema\Directives\NeqDirective """ Use the client given value to add an not-equal conditional to a database query. """ directive @neq( """ Specify the database column to compare. Only required if database column has a different name than the attribute in your schema. """ key: String ) on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\NestDirective """ A no-op nested arg resolver that delegates all calls to the ArgResolver directives attached to the children. """ directive @nest on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\NodeDirective """ Register a type for Relay's global object identification. When used without any arguments, Lighthouse will attempt to resolve the type through a model with the same name. """ directive @node( """ Reference to a function that receives the decoded `id` and returns a result. Consists of two parts: a class name and a method name, seperated by an `@` symbol. If you pass only a class name, the method name defaults to `__invoke`. """ resolver: String """ Specify the class name of the model to use. This is only needed when the default model detection does not work. """ model: String ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\NotInDirective """ Use the client given value to add a NOT IN conditional to a database query. """ directive @notIn( """ Specify the database column to compare. Only required if database column has a different name than the attribute in your schema. """ key: String ) on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\RenameArgsDirective """ Apply the @rename directives on the incoming arguments. """ directive @renameArgs on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\RenameDirective """ Change the internally used name of a field or argument. This does not change the schema from a client perspective. """ directive @rename( """ The internal name of an attribute/property/key. """ attribute: String! ) on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\SanitizeDirective """ Apply sanitization to the arguments of a field. """ directive @sanitize on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\ScalarDirective """ Reference a class implementing a scalar definition. """ directive @scalar( """ Reference to a class that extends `\GraphQL\Type\Definition\ScalarType`. """ class: String! ) on SCALAR # Directive class: Nuwave\Lighthouse\Schema\Directives\ScopeDirective """ Adds a scope to the query builder. The scope method will receive the client-given value of the argument as the second parameter. """ directive @scope( """ The name of the scope. """ name: String! ) on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\SearchDirective """ Perform a full-text search by the given input value. """ directive @search( """ Specify a custom index to use for search. """ within: String ) on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\SpreadDirective """ Merge the fields of a nested input object into the arguments of its parent when processing the field arguments given by a client. """ directive @spread on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\SubscriptionDirective """ Reference a class to handle the broadcasting of a subscription to clients. The given class must extend `\Nuwave\Lighthouse\Schema\Types\GraphQLSubscription`. """ directive @subscription( """ A reference to a subclass of `\Nuwave\Lighthouse\Schema\Types\GraphQLSubscription`. """ class: String! ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\TransformArgsDirective """ Transform the arguments of a field. """ directive @transformArgs on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\TrimDirective """ Remove whitespace from the beginning and end of a given input. This can be used on: - a single argument or input field to sanitize that subtree - a field to trim all strings """ directive @trim on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION | FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\UnionDirective """ Use a custom function to determine the concrete type of unions. """ directive @union( """ Reference a function that returns the implementing Object Type. Consists of two parts: a class name and a method name, seperated by an `@` symbol. If you pass only a class name, the method name defaults to `__invoke`. """ resolveType: String! ) on UNION # Directive class: Nuwave\Lighthouse\Schema\Directives\UpdateDirective """ Update an Eloquent model with the input values of the field. """ directive @update( """ Specify the class name of the model to use. This is only needed when the default model detection does not work. """ model: String """ Set to `true` to use global ids for finding the model. If set to `false`, regular non-global ids are used. """ globalId: Boolean = false """ Specify the name of the relation on the parent model. This is only needed when using this directive as a nested arg resolver and if the name of the relation is not the arg name. """ relation: String ) on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\UpsertDirective """ Create or update an Eloquent model with the input values of the field. """ directive @upsert( """ Specify the class name of the model to use. This is only needed when the default model detection does not work. """ model: String """ Set to `true` to use global ids for finding the model. If set to `false`, regular non-global ids are used. """ globalId: Boolean = false """ Specify the name of the relation on the parent model. This is only needed when using this directive as a nested arg resolver and if the name of the relation is not the arg name. """ relation: String ) on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\WhereAuthDirective """ Filter a type to only return instances owned by the current user. """ directive @whereAuth( """ Name of the relationship that links to the user model. """ relation: String! """ Specify which guard to use, e.g. "api". When not defined, the default from `lighthouse.php` is used. """ guard: String ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\WhereBetweenDirective """ Verify that a column's value is between two values. The type of the input value this is defined upon should be an `input` object with two fields. """ directive @whereBetween( """ Specify the database column to compare. Only required if database column has a different name than the attribute in your schema. """ key: String ) on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\WhereDirective """ Use an input value as a [where filter](https://laravel.com/docs/queries#where-clauses). """ directive @where( """ Specify the operator to use within the WHERE condition. """ operator: String = "=" """ Specify the database column to compare. Only required if database column has a different name than the attribute in your schema. """ key: String """ Use Laravel's where clauses upon the query builder. """ clause: String ) on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\WhereJsonContainsDirective """ Use an input value as a [whereJsonContains filter](https://laravel.com/docs/queries#json-where-clauses). """ directive @whereJsonContains( """ Specify the database column and path inside the JSON to compare. Only required if database column has a different name than the attribute in your schema. """ key: String ) on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\WhereNotBetweenDirective """ Verify that a column's value lies outside of two values. The type of the input value this is defined upon should be an `input` object with two fields. """ directive @whereNotBetween( """ Specify the database column to compare. Only required if database column has a different name than the attribute in your schema. """ key: String ) on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\WithCountDirective """ Eager-load the count of an Eloquent relation if the field is queried. Note that this does not return a value for the field, the count is simply prefetched, assuming it is used to compute the field value. Use `@count` if the field should simply return the relation count. """ directive @withCount( """ Specify the relationship method name in the model class. """ relation: String! """ Apply scopes to the underlying query. """ scopes: [String!] ) on FIELD_DEFINITION # Directive class: Nuwave\Lighthouse\Schema\Directives\WithDirective """ Eager-load an Eloquent relation. """ directive @with( """ Specify the relationship method name in the model class, if it is named different from the field in the schema. """ relation: String """ Apply scopes to the underlying query. """ scopes: [String!] ) on FIELD_DEFINITION
尋找差異