Skip to content

tmateus-github/laravel-graphql-demo

Repository files navigation

Project

Laravel framework with GraphQL integration.

Usage example

Query variables:

{
  products {
    name,
    description,
    country
  }
}

Output response:

{
  "data": {
    "products": [
      {
        "name": "Product A",
        "description": "Description of Product A",
        "country": "Portugal"
      },
      {
        "name": "Product B",
        "description": "Description of Product B",
        "country": "Spain"
      },
      {
        "name": "Product C",
        "description": "Description of Product C",
        "country": "France"
      },
      {
        "name": "Product D",
        "description": "Description of Product D",
        "country": "Italy"
      }
    ]
  }
}

Query variables:

{
  product(id: 1) {
    name,
    description,
    country
  }
}

Output response:

{
  "data": {
    "product": {
      "name": "Product A",
      "description": "Description of Product A",
      "country": "Portugal"
    }
  }
}

Testing API

Either you can user postman or electronjs.

About

Laravel framework with GraphQL integration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published