Download the PHP package oligus/schema without Composer

On this page you can find all versions of the php package oligus/schema. 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 schema

GraphQL Schema

GraphQL schema library.

Build Status License: MIT Codecov.io

Install

Contents

Quick start
Types
    Type modifiers
    Scalar
    Built in scalar types
    Objects
    Interfaces
    Enums
    Inputs
Fields
    Arguments
    Argument values
Development

Quick start

Result:

Types

The fundamental unit of any GraphQL Schema is the type. There are six kinds of named type definitions in GraphQL, and two wrapping types.

GrapQL Spec

Available types:

Type modifiers

Type modifiers are used in conjunction with types, add modifier to a type to modify the type in question.

Definition

TypeModifier(?bool $nullable, ?bool $listable, ?bool $nullableList)

Modifiers

Type Syntax Example
Nullable Type \ String
Non-null Type \! String!
List Type [\] [String]
List of Non-null Types [\!] [String!]
Non-null List Type [\]! [String]!
Non-null List of Non-null Types [\!]! [String!]!

Examples

Result:

Scalar

Scalar types represent primitive leaf values in a GraphQL type system. GraphQL responses take the form of a hierarchical tree; the leaves on these trees are GraphQL scalars.

GrapQL Spec

Definition

Scalar(string $name, ?string $description)

Examples

Result:

Built in scalar types

GraphQL provides a basic set of well‐defined Scalar types. A GraphQL server should support all of these types.

Built in types: Boolean, Float, ID, Integer, String

GrapQL Spec

Definition

<TYPE>Type(?TypeModifier $modifier)

Where \<TYPE> is Boolean, Float, ID, Integer or String

Examples

Result:

Objects

GraphQL queries are hierarchical and composed, describing a tree of information. While Scalar types describe the leaf values of these hierarchical queries, Objects describe the intermediate levels.

GrapQL Spec

Definition

ObjectType(string $name, ?string $description = null)

Examples

Result:

Implement interface

Result:

Interfaces

GraphQL interfaces represent a list of named fields and their arguments. GraphQL objects can then implement these interfaces which requires that the object type will define all fields defined by those interfaces.

GrapQL Spec

Definition

InterfaceType(string $name, ?string $description = null)

Examples

Result:

Unions

GraphQL Unions represent an object that could be one of a list of GraphQL Object types, but provides for no guaranteed fields between those types. They also differ from interfaces in that Object types declare what interfaces they implement, but are not aware of what unions contain them.

GrapQL Spec

Definitions

UnionType(string $name, ?string $description = null)

Add object:

addObjectType(ObjectType $objectType): void

Examples

Result:

Enums

GraphQL Enum types, like scalar types, also represent leaf values in a GraphQL type system. However Enum types describe the set of possible values.

GrapQL Spec

Definitions

EnumType(string $name, ?string $description = null, array $enums = [])

Add enum:

add(string $enum)

Examples

Result:

Directives

A GraphQL schema describes directives which are used to annotate various parts of a GraphQL document as an indicator that they should be evaluated differently by a validator, executor, or client tool such as a code generator.

GrapQL Spec

Definitions

EnumType(string $name, ?string $description = null, array $enums = [])

Add locations:

add(ExecutableDirectiveLocation $location)

Examples

Result:

Inputs

Fields may accept arguments to configure their behavior. These inputs are often scalars or enums, but they sometimes need to represent more complex values.

GrapQL Spec

Definition

InputType(string $name, ?string $description = null)

Add field:

addField(Field $field): void

Examples

Result:

Fields

A selection set is primarily composed of fields. A field describes one discrete piece of information available to request within a selection set.

GrapQL Spec

Definition

Field(string $name, Type $type, ?TypeModifier $typeModifier, ?string $description)

Examples

Result:

With type modifier:

Result:

With type argument:

Arguments

Fields are conceptually functions which return values, and occasionally accept arguments which alter their behavior. These arguments often map directly to function arguments within a GraphQL server’s implementation.

GrapQL Spec

Definition

Argument(string $name, Type $type, ?TypeModifier $typeModifier, ?Value $defaultVale)

Examples

Result:

With type modifier:

With type default value:

Argument values

Set simple scalar values for default values in arguments.

Definition

Value(mixed $value)

Available values: ValueBoolean, ValueFloat, ValueInteger, ValueNull, ValueString

Examples

Development

Download and build docker container

Access docker image


All versions of schema with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
doctrine/collections Version ^1.5
myclabs/php-enum Version ^1.7
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 oligus/schema contains the following files

Loading the files please wait ....