What is the rationale for getReadOnlySchema() / copyReadOnly(schema)? #345
              
                Unanswered
              
          
                  
                    
                      aleksandarsusnjar
                    
                  
                
                  asked this question in
                Q&A
              
            Replies: 0 comments
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I just started using
graphql-java,graphql-java-kickstartandgraphql-java-servlet. My question is why does theDefaultGraphQLSchemaProvidercreate a copy of the schema without mutations?I saw a mention of preventing mutations before authentication. However, for me at least, authentication itself is a mutation and security, authorization and access control are done at fine-grain level throughout my code anyway. Furthermore, my schema isn't supposed to be a secret even to unauthenticated clients. They will be able to know all the mutations anyway. Awareness of existence of an API function isn't a factor in deciding whether the client is allowed to use it.
Is it that
GraphQLSchemaisn't entirely immutable? Quick check suggests that it is.Thanks!
Beta Was this translation helpful? Give feedback.
All reactions