Download the PHP package lastdragon-ru/lara-asp-graphql without Composer

On this page you can find all versions of the php package lastdragon-ru/lara-asp-graphql. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package lara-asp-graphql

(Laravel) GraphQL Extensions for Lighthouse

This package provides highly powerful @sortBy is not only about standard sorting by columns but also allows use relations. 😎

[include:artisan]: <lara-asp-documentator:requirements "{$directory}">

Requirements

Requirement Constraint Supported by
PHP ^8.3 HEAD ⋯ 5.0.0
^8.2 HEAD ⋯ 2.0.0
^8.1 6.4.2 ⋯ 2.0.0
^8.0 4.6.0 ⋯ 2.0.0
^8.0.0 1.1.2 ⋯ 0.12.0
>=8.0.0 0.11.0 ⋯ 0.5.0
Laravel ^11.0.0 HEAD ⋯ 6.2.0
^10.34.0 HEAD ⋯ 6.2.0
^10.0.0 6.1.0 ⋯ 2.1.0
^9.21.0 5.6.0 ⋯ 5.0.0-beta.1
^9.0.0 5.0.0-beta.0 ⋯ 0.12.0
^8.22.1 3.0.0 ⋯ 0.5.0
Lighthouse ^6.5.0 HEAD ⋯ 5.0.0-beta.0
^6.0.0 4.6.0 ⋯ 4.0.0
^5.68.0 3.0.0 ⋯ 2.0.0
^5.8.0 1.1.2 ⋯ 0.13.0
^5.6.1 0.12.0 , 0.11.0
^5.4 0.10.0 ⋯ 0.5.0

Installation

Configuration

Config can be used, for example, to customize supported operators for each type. Before this, you need to publish it via the following command, and then you can edit config/lara-asp-graphql.php.

Directives

@searchBy

Probably the most powerful directive to provide search (where conditions) for your GraphQL queries.

Read more.

@sortBy

Probably the most powerful directive to provide sort (order by conditions) for your GraphQL queries.

Read more.

@stream 🧪

Unlike the @paginate (and similar) directive, the @stream provides a uniform way to perform Offset/Limit and Cursor pagination of Eloquent/Query/Scout builders. Filtering and sorting enabled by default via @sortBy directives.

Read more.

@type

Converts scalar into GraphQL Type. Similar to Lighthouse's @scalar directive, but uses Laravel Container to resolve instance and also supports PHP enums.

Read more.

Scalars

[!IMPORTANT]

You should register the Scalar before use, it can be done via TypeRegistry, or as a custom scalar inside the Schema:

JsonString

Represents JSON string.

Read more.

Scout

Scout is also supported 🤩. You just need to add @search directive to an argument. Please note that available operators depend on Scout itself.

Please note that if the @search directive added, the generated query will expect the Scout builder only. So recommended using non-nullable String! type to avoid using the Eloquent builder (it will happen if the search argument missed or null; see also lighthouse#2465.

Input type auto-generation

The type used with the Builder directives like @searchBy/@sortBy may be Explicit (when you specify the input name field(where: InputTypeName @searchBy): [Object!]!) or Implicit (when the _ used, field(where: _ @searchBy): [Object!]!). They are processing a bit differently.

For Explicit type, all fields except unions and marked as ignored (if supported by the directive) will be included.

For Implicit type, the following rules are applied (in this order; concrete directive may have differences, please check its docs):

When converting the field, some of the original directives will be copied into the newly generated field. For the Explicit type, all directives except operators of other directives will be copied. For Implicit type, you can use builder.allowed_directives setting to control. Be aware of directive locations - the package doesn't perform any checks to ensure that the copied directive allowed on INPUT_FIELD_DEFINITION, it just copies it as is.

Builder field/column name

By default @searchBy/@sortBy will convert nested/related fields into dot string: eg {user: {name: asc}} will be converted into user.name. You can redefine this behavior by BuilderFieldResolver:

Builder type detection

Directives like @searchBy/@sortBy have a unique set of operators and other features for each type of Builder (Eloquent/Scout/etc). Detection of the current Builder works fine for standard Lighthouse directives like @all, @paginated, @search, etc and relies on proper type hints of Relations/Queries/Resolvers. You may get BuilderUnknown error if the type hint is missed or the union type is used.

If you implement custom directives which internally enhance the Builder (like standard directives do), you may get BuilderUnknown error because the proper/expected builder type was not detected. In this case, your directive should implement BuilderInfoProvider interface and to specify the builder type explicitly.

Printer

The package provides bindings for Printer so you can simply use:

Example output The `$printer->print($schema)` is:

Testing Assertions

assertGraphQLIntrospectionEquals

Compares default public schema (as the client sees it through introspection).

Read more.

assertGraphQLSchemaEquals

Compares default internal schema (with all directives).

Read more.

assertGraphQLSchemaNoBreakingChanges

Checks that no breaking changes in the default internal schema (with all directives).

Read more.

assertGraphQLSchemaNoDangerousChanges

Checks that no dangerous changes in the default internal schema (with all directives).

Read more.

assertGraphQLSchemaValid

Validates default internal schema (with all directives). Faster than lighthouse:validate-schema command because loads only used directives.

Read more.

Upgrading

Please follow Upgrade Guide.

Contributing

This package is the part of Awesome Set of Packages for Laravel. Please use the main repository to report issues, send pull requests, or ask questions.


All versions of lara-asp-graphql with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1|^8.2|^8.3
ext-filter Version *
ext-mbstring Version *
composer/semver Version ^3.2
illuminate/collections Version ^10.34.0|^11.0.0
illuminate/container Version ^10.34.0|^11.0.0
illuminate/contracts Version ^10.34.0|^11.0.0
illuminate/database Version ^10.34.0|^11.0.0
illuminate/support Version ^10.34.0|^11.0.0
nuwave/lighthouse Version ^6.5.0
lastdragon-ru/lara-asp-core Version self.version
lastdragon-ru/lara-asp-eloquent Version self.version
lastdragon-ru/lara-asp-graphql-printer Version self.version
lastdragon-ru/lara-asp-serializer Version self.version
symfony/deprecation-contracts Version ^3.0.0
symfony/polyfill-php83 Version ^1.28
webonyx/graphql-php Version ^15.4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lastdragon-ru/lara-asp-graphql contains the following files

Loading the files please wait ....