graphql-java

How to get the generated scheme file .graphqls using SPQR?

怎甘沉沦 提交于 2021-01-19 06:19:11
问题 I really like the way SPQR makes easy to integrate graphql with an existing system, the only thing I'd like to see is the .graphqls file so I can learn more on GraphQL Syntax. Is there a way to generate the scheme file from an existing code with SPQR annotations integrated? To provide some code let's use the same code from the GitHub site Entity: public class User { private String name; private Integer id; private Date registrationDate; @GraphQLQuery(name = "name", description = "A person's

how to Disable Schema Introspection in graphql-spqr-spring-boot-starter

自闭症网瘾萝莉.ら 提交于 2021-01-05 07:40:31
问题 I have integrated my spring boot application with graphql-spqr-spring-boot-starter https://github.com/leangen/graphql-spqr-spring-boot-starter , I need to find a way on how to disable graphql schema introspection since its a security issue for production. 回答1: I am using graphql-spqr 0.9.9 and graphql-spqr-spring-boot-starter 0.0.4, but the code base changed for graphql-spqr 0.10. I'll try to cover both cases, but keep in mind you might have to tweak the code snippets a bit. In Graphql-spqr

how to Disable Schema Introspection in graphql-spqr-spring-boot-starter

帅比萌擦擦* 提交于 2021-01-05 07:39:09
问题 I have integrated my spring boot application with graphql-spqr-spring-boot-starter https://github.com/leangen/graphql-spqr-spring-boot-starter , I need to find a way on how to disable graphql schema introspection since its a security issue for production. 回答1: I am using graphql-spqr 0.9.9 and graphql-spqr-spring-boot-starter 0.0.4, but the code base changed for graphql-spqr 0.10. I'll try to cover both cases, but keep in mind you might have to tweak the code snippets a bit. In Graphql-spqr

Graphql use Input type to search data

怎甘沉沦 提交于 2020-07-09 05:21:25
问题 I have problem searching with using Input data in graphql : @RestController @RequestMapping("/api/dictionary/") @RequiredArgsConstructor(onConstructor = @__(@Autowired)) public class DictionaryController { @Value("classpath:items.graphqls") private Resource schemaResource; private GraphQL graphQL; private final DictionaryService dictionaryService; @PostConstruct public void loadSchema() throws IOException { File schemaFile = schemaResource.getFile(); TypeDefinitionRegistry registry = new

exposing dynamic schemas with graphql

一个人想着一个人 提交于 2020-07-07 14:20:26
问题 My application handles schema on the fly. Users can upload new domains or change the definitions of existing domains. For ex, say, I ship the product with a user schema like this : user { fn, ln, age } Later user can change this definition to include new properties; user { fn, ln, age, salary, address } or they can add an entirely new domain concept. If I use GraphQL, is there a way to change the schema dynamically ? Another question is; Our schemas have conditions that make some parts of the

How can I implement apollographql client into the maven project to activate subscription?

牧云@^-^@ 提交于 2020-06-29 04:24:26
问题 I am trying to create a graphql client in Java project and I am using apollographql library. The problem is that I am not able to get the dependencies using the pom.xml with version different than from Central repository. The other thing is that all of the examples are built with Gradle. Do you have any examples or ideas about how to create a simple subscription client using apollo library and maven project? One of the specific issues that I have is that once apollographql-runtime library is