Skip to content

This is a Hello World app that shows how to use GraphQLBundle in Symfony 4 projects.

Notifications You must be signed in to change notification settings

programarivm/graphql-demo-symfony4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GraphQL Demo for Symfony 4

This is a simple demo that shows how to use GraphQLBundle in Symfony 4 projects, and is an equivalent of Youshido/GraphQLDemoApp -- a GraphQL demo for Symfony 3.

This Hello World app is been set up with the comments made in this discussion: Symfony 4 support.

How to Run

Install dependencies:

composer install

Run the web server:

php -S 127.0.0.1:8085 -t public

Examples

Request:

$ curl -XPOST 'http://localhost:8085/graphql'

Response:

{
    "errors": [
        {
            "message": "Must provide an operation."
        }
    ]
}

Request:

$ curl -XPOST 'http://localhost:8085/graphql' -F 'query={ greeting }'

Response:

{
    "data": {
        "greeting": "Hello world!"
    }
}

Contributions

Contributions are welcome.

Many thanks.

About

This is a Hello World app that shows how to use GraphQLBundle in Symfony 4 projects.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages