Skip to content
This repository was archived by the owner on Feb 10, 2019. It is now read-only.
This repository was archived by the owner on Feb 10, 2019. It is now read-only.

Create contracts Type to use in all Graph type  #398

@FabrizioCafolla

Description

@FabrizioCafolla

I thought that to add types (Timestamp, PaginationMeta, Links etc ..) in a simple and intuitive way was to create a class that has a static method for each type and that calls it by passing the value of the query in the "resolve" so that can be processed independently. This allows me to call these methods staunchly and makes it easy to use them in multiple types.
What do you think?

UserType.php with TimestampType for data
query=query+FetchUsers{users{id,name,timestamp{created_at,updated_at}}}
usertype

TypeRegistry all method that return Contracts type with resolve() function
typeregistry

TimestampType is type of time, you can add field to fields array
timestamptype

schermata del 2018-10-30 10-10-00

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions