- 
                Notifications
    You must be signed in to change notification settings 
- Fork 55
Mutation #213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Mutation #213
Conversation
feat: add JPA @EmbeddedId support (introproventures#84)
merge master
merge master
merge master
merge master
update master
pull change
update master
update master
| Codecov Report
 @@             Coverage Diff             @@
##             master     #213     +/-   ##
===========================================
+ Coverage     74.05%   74.25%   +0.2%     
- Complexity      882     1006    +124     
===========================================
  Files            50       63     +13     
  Lines          3754     4296    +542     
  Branches        628      709     +81     
===========================================
+ Hits           2780     3190    +410     
- Misses          696      778     +82     
- Partials        278      328     +50
 Continue to review full report at Codecov. 
 | 
| Is there any update on this? Or is there another way to do mutations? | 
| I don’t know other ways to apply mutations. I think the use of mutations will be useful, but so far this is a crude solution. If necessary, I will try to support the revision. | 
| Any news? I'd like to use mutations with graphql-jpa-query. | 
| 
 Yes. You can do any migrations using the standard base class. | 
| will there be an opportunity to do merge? If yes, I can update the branch. | 
| 
 I got the following error: I added the file  The Subscriber type is auto-generated from the schema. Am i missing something?  | 
62d001d    to
    e72c364      
    Compare
  
    
Control of access rights for reading entities.
The @GraphQLReadEntityForRole annotation indicates which roles are available for reading. If this annotation is not available to everyone. When creating GraphQLJpaSchemaBuilder, you can set predicateRole to which the array of roles is passed and the predicate should return whether the current user has any of the transferred roles.
Mutations
there are 4 operations
insert
update
merge
delete
4 mutations are prepared for each entity
insertEntity - insertion of the specified entity, entities specified in the parameters are searched in the database
updateEntity - update record by id, entities specified in the parameters are searched in the database
mergeEntity - full merge, inserts / updates all specified parameters
deleteEntity - delete by id
to process queries in the system graphQL types are created with the prefix specified through suffixInputObjectType (by default, Input)
example queries in MutationTests
The @GraphQLWriteEntityList and @GraphQLWriteEntityForRole annotation indicates which roles what actions are available. If this annotation is not specified and an access predicate is specified, an exception is raised. When creating GraphQLJpaSchemaBuilderWithMutation, you can set predicateRole to which the array of roles is passed and the predicate should return whether the current user has any of the transferred roles.
This code is still poorly tested.