do you really need it to be authenticated or just make it work from the front-end?


I hope that's for a development environment, base64 is decodable ;)


I'm using the headers property in axios and sending 'Authorization': 'Basic YWRtaW46cGFzc3dvcmQ=' which is a base64 encoding of my admin username:password


Anyone had any experience in authenticating a GraphQL call in Vue.js or Nuxt.js? All I can seem to get back is a 403 error.


I just have a test project set up and I found this:

  • just setting the director rule (route) is not enough - it gives the same error
  • as soon as I added a type to the scheme eg
    1. SilverStripe\GraphQL\Manager:
    2. schemas:
    3. default:
    4. scaffolding:
    5. types:
    6. Page:
    7. fields: [ID, Title, Content]
    8. operations:
    9. read: true
    10. create: true

    it works... so maybe the schema can't be empty?


Any takers? https://forum.silverstripe.org/t/issue-getting-graphql-to-work/1740

Show 1 attachment(s)
Silverstripe Forum  
Issue getting GraphQL to work

Silverstripe Version: 4.3 Question: I have setup GraphQL with an empty config and as far as I can tell I should be getting a result for the query: /graphql/?query={__schema{types{kind+name+description}}} I have set up the route with SilverStripe\Control\Director: rules: 'graphql': '%$SilverStripe\GraphQL\Controller.default' but all I get back is an error - “Schema query must be Object Type but got: NULL” The route /admin/graphql is working and gives me the expected result I have o...

Hide attachment content