Answers.Body: <p>It turned out that MAMP Pro was stripping out the Authorization header, so every request was treated as a request to the public schema. The solution for MAMP Pro was to enable "Identical PHP version for all hosts (module mode)" in the PHP tab.</p>
  
  <p>Thanks to Brandon Kelly from the Craft forum for pointing me in the right direction.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-02T13:47:20.253Z
Answers.LastActivityDate: 2019-12-02T13:47:20.253Z
Answers.UserDisplayName: gbmillard
Body: <p>I am setting up GraphQL on my Craft project, v3.3.16.3
  I have a public schema exposing a public entry type, and a private schema exposing a private entry type.
  When I switch between them in the GraphQL -> Explore panel, both return the results of the public schema. </p>
  
  <p>See attached screens.</p>
  
  <p><a href="https://i.sstatic.net/9M9hM.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/9M9hM.png" alt="Public schema settings"></a></p>
  
  <p><a href="https://i.sstatic.net/87W5U.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/87W5U.png" alt="Private schema settings"></a></p>
  
  <p><a href="https://i.sstatic.net/Z8QbE.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Z8QbE.png" alt="Public schema query results"></a></p>
  
  <p><a href="https://i.sstatic.net/1tlLD.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/1tlLD.png" alt="Private schema query results"></a></p>
  
  <p>Any suggestions would be much appreciated! Thanks :-)</p>
  
Tags: <craft3><graphql>
Title: GraphQL private schema returning public schema scope
ThreadText: # GraphQL private schema returning public schema scope
  
  (Asked by: username_0 on 2019-12-02)
  
  I am setting up GraphQL on my Craft project, v3.3.16.3
  I have a public schema exposing a public entry type, and a private schema exposing a private entry type.
  When I switch between them in the GraphQL -> Explore panel, both return the results of the public schema.
  
  See attached screens.
  
  [![Public schema settings](https://i.sstatic.net/9M9hM.png)](https://i.sstatic.net/9M9hM.png)
  
  [![Private schema settings](https://i.sstatic.net/87W5U.png)](https://i.sstatic.net/87W5U.png)
  
  [![Public schema query results](https://i.sstatic.net/Z8QbE.png)](https://i.sstatic.net/Z8QbE.png)
  
  [![Private schema query results](https://i.sstatic.net/1tlLD.png)](https://i.sstatic.net/1tlLD.png)
  
  Any suggestions would be much appreciated! Thanks :-)
  
  **Tags:** craft3, graphql
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2019-12-02. Score: 2
  
  It turned out that MAMP Pro was stripping out the Authorization header, so every request was treated as a request to the public schema. The solution for MAMP Pro was to enable "Identical PHP version for all hosts (module mode)" in the PHP tab.
  
  Thanks to Brandon Kelly from the Craft forum for pointing me in the right direction.
  
  
  ---
  
  