Answers.Body: <p>You can query for elements (entries, users, etc.) using Craft's GraphQL API, but not for collections of elements (sections, user groups, etc.).</p>
  <p>I already answered a very similar question, see <a href="https://craftcms.stackexchange.com/a/39709/180">https://craftcms.stackexchange.com/a/39709/180</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-29T11:49:17.883Z
Answers.LastActivityDate: 2022-07-29T11:49:17.883Z
Answers.UserDisplayName: Ben Croker
Body: <p>So, I am creating new section called &quot;My Section&quot; with handle &quot;mySection&quot; via plugin. All good there.</p>
  <p>I want to be able for my section to be Viewable via Public Schema each time it is created (when plugin is installed / enabled).</p>
  <p>I cannot figure out how to add my section inside Viewable Public Schema using Gql in plugin.</p>
  <p>Anyone has any idea or snippet?</p>
  
Tags: <plugin-development><graphql>
Title: Adding section to Graphql "View - Public Schema" programatically
ThreadText: # Adding section to Graphql "View - Public Schema" programatically
  
  (Asked by: username_0 on 2022-07-29)
  
  So, I am creating new section called "My Section" with handle "mySection" via plugin. All good there.
  
  I want to be able for my section to be Viewable via Public Schema each time it is created (when plugin is installed / enabled).
  
  I cannot figure out how to add my section inside Viewable Public Schema using Gql in plugin.
  
  Anyone has any idea or snippet?
  
  **Tags:** plugin-development, graphql
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-07-29. Score: 2 | Accepted answer
  
  You can query for elements (entries, users, etc.) using Craft's GraphQL API, but not for collections of elements (sections, user groups, etc.).
  
  I already answered a very similar question, see <https://craftcms.stackexchange.com/a/39709/180>
  
  
  ---
  
  