Hi,
I try to define a custom API from REST to Graph from open source tyk on Docker image it’s not an easier way.
I try to work with example in the doc here
I activate successfully the playground with many errors :
server can be reach
and
{
"error": "Unexpected token < in JSON at position 0"
}
without playground, I tried to grab countries with this query :
query|without query key {
countries {
name
}
}
result of the query is:
{
"errors": [
{
"message": "type not defined: ",
"path": [
"query"
]
}
]
}
Edit :
in my api config file have added in graphql
key a schema
key with value:
"type Query { \n countries: {\n countries: String\n}\n}
Error change to :
{
"error": "there was a problem proxying the request"
}
and catch in docker log :
➜ tyk git:(main) ✗ time="May 21 14:47:28" level=error msg="Schema is not created" api_id=3
api_name=Catalogue key="****cf22" mw=GraphQLMiddleware org_id=1 origin=172.18.0.1
path="/catalogue/"
Thanks for your help.
Best,