Hello,
I came across this video https://www.youtube.com/watch?v=y19EaW2X7ac loved the idea of schema first GraphQL implementation and wanted to try it out. I've setup a blank Laravel 5.6 project two simple models User (_hasOne_) and Profile (_belongsTo_).
This is my routes/graphql/schema.graphql
type Profile {
id: ID!
first_name: String
last_name: String
age: Int
gender: String
}
type Query {
profiles: [Profile!]! @field(resolver: "App\\Http\\GraphQL\\Query@profiles")
}
and my App\Http\GraphQL\Query@profiles (resolver)
<?php
namespace App\Http\Controllers\GraphQL;
use App\Profile;
class Query
{
public function profiles($root, $args)
{
return Profile::all();
}
}
When I run my app and load the graphiql app pointing to http://localhost:8000/graphql endpoint, I am detecting the following error:
GraphQL \ Error \ SyntaxError
Syntax Error GraphQL (26:2) Unexpected25: # Auto Complete: Ctrl-Space (or just start typing) 26: # ^
Full error: https://pastebin.com/raw/JcLf3dKA
Am I doing something wrong here? or is this a bug?
This error only occurs in the chrome extension https://chrome.google.com/webstore/detail/chromeiql/fkkiamalmpiidkljmicmjfbieiclmeij?hl=en - the api is working fine on https://electronjs.org/apps/graphiql (tool being used in the video).
Get GraphQL Playground, its better.
On 16 May 2018, at 02:40, Latheesan Kanesamoorthy notifications@github.com wrote:
This error only occurs in the chrome extension https://chrome.google.com/webstore/detail/chromeiql/fkkiamalmpiidkljmicmjfbieiclmeij?hl=en - the api is working fine on https://electronjs.org/apps/graphiql (tool being used in the video).
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
@kikoseijo I can do you one better https://altair.sirmuel.design/
Most helpful comment
@kikoseijo I can do you one better https://altair.sirmuel.design/