Fixed schema and SecurityConfig samples/webmvc-http-security
- Fixed the attribute value salary of UpdateSalaryInput of schema.graphqls to the name of SalaryInput object
- Enable @Secured for Spring Security
@kuraun Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.
@kuraun Thank you for signing the Contributor License Agreement!
These changes make sense and are a step in the right direction, but we need additional changes to be able to test and for the tests to pass. For example, the sample is not currently enabled in main See 59b0d76d8d43c298cd05dc0bfecc64cc32d4b5f2
The changes are old enough that it was based off of 1.0.x but is pushing to main which I think at this point is causing some problems. When I get a bit further running the tests I get various NoSuchMethodErrors
canNotMutationUpdateSalary()
java.lang.NoSuchMethodError: 'void org.springframework.graphql.support.DefaultGraphQlRequest.<init>(java.lang.String, java.lang.String, java.util.Map)'
at org.springframework.graphql.test.tester.DefaultGraphQlTester$DefaultRequest.request(DefaultGraphQlTester.java:162)
at org.springframework.graphql.test.tester.DefaultGraphQlTester$DefaultRequest.execute(DefaultGraphQlTester.java:148)
at io.spring.sample.graphql.WebMvcHttpSecuritySampleTests.canNotMutationUpdateSalary(WebMvcHttpSecuritySampleTests.java:84)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
I've merged this into the 1.0.x branch where samples are still enabled. I also applied the same changes to the WebFlux sample, but the test fails and is disabled, if you want to give it a try @rwinch.
@rstoyanchev Hi! Thank you for your thoughtfulness.