How to use a contract first approach with GraphQL and Quarkus? [closed] - graphql

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 hours ago.
This post was edited and submitted for review 9 hours ago.
Improve this question
For REST API Iā€™m using openapi-generator-maven-plugin to generate java interfaces with jax-rs annotations by an Open API contract and after that, I implement interfaces and run an application at Quarkus with quarkus-resteasy-reactive extension.
Now I want to build GraphQL API at Quarkus using the same approach (generate server code by GraphQL contract). How can I do it with Quarkus with smallrya GraphQL extension (or may be something different)?

Quarkus implements the MicroProfile GraphQL specification, and that is focused on code-first approach only. For server-side GraphQL development, unfortunately there is currently no tooling for the contract-first approach. Should you be interested in client-side development, there are a few tools... (an experimental generator for typesafe client stubs, and an IntelliJ plugin providing autocompletion of typesafe client interfaces)

Related

Is there a recommended library for building GraphQL queries? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I'm calling a service that exposes a GraphQL interface. So I'm able to post a GraphQL query and receive data back via curl. Now I want to write a service that builds the query for me (dynamically, based on query parameters I send my endpoint) and sends the request and gets the response back.
I'm using Spring Boot 2.1.4.
I know you can build queries with the elastic search library in Spring. Wondering if there's something similar for GraphQL.
There's a few clients, taking rather different approaches.
SmallRye GraphQL - Offers both a dynamic and a typesafe client
Netflix DGS client - Has both a simple and a type-safe client
Apollo Kotlin - Generates Kotlin and Java models from GraphQL queries.
There's a Node based Java client generator and a Maven plugin for it too.
Nodes
Shopify's GraphQL code gen - Needs (J)Ruby to run but generates Java code.
Manifold can be used as a GraphQL client
These are all different beasts, as you'll see, so you'll have to decide what fits.

Quarkus : Converting existing spring application [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
Can someone share the experience of converting existing spring application to Quarkus
Existing spring application has dependencies with 1) Swagger 2) Oracle Jdbc Driver 3)Logging framework 4) Spring auto wiring
It depends if you want to generate native executable or not.
In JVM mode:
we have a Swagger extension based on OpenAPI that gets you the Swagger UI in dev mode (https://quarkus.io/guides/openapi-swaggerui-guide). If you want to use Swagger itself, well, you should be able to include it without any issue.
the Oracle JDBC driver should work out of the box
logging wouldn't be an issue. We come with JBoss Logging which has several adapters for other frameworks.
we have a Spring compatibility extension for autowiring that translates the Spring annotations to CDI: https://quarkus.io/guides/spring-di-guide
And then, there's the GraalVM native executable mode. And then comes the bad news: I don't think the Oracle JDBC driver will work for now. We don't have an extension for it and I'm pretty sure it won't work out of the box for now.
But Quarkus has benefits even in JVM mode, so it would be worth it anyway.
If you start this journey, we're interested in feedback, either on the mailing list or in GitHub issues.

What is mean by a lightweight framework? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem ā€” and include valid code to reproduce it ā€” in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
What is a lightweight framework? Why it is saying that codeigniter is lightweight?
Here is a post i found on coderanch.com :
The term "lightweight" refers to the conceptual weight of a framework.
Lightweight frameworks like Spring have minimal impact to an
application. That is, it does not require as many code changes to
incorporate them into your application as does the more heavyweight
frameworks like EJB. When you create an EJB, you have to deal with
several interfaces and it is pretty clear by looking at the code that
an EJB is tightly coupled to the J2EE framework. On the other hand, a
POJO is usually blissfully unaware that it is being used in the Spring
Framework. Spring is minimally-invasive. There are also claims that it
should not be a very difficult task to take Spring out and replace it
with another similar framework.
With lightweight frameworks, you do not have to think too much about
the underlying framework because there really isn't much code to write
that explicitly ties you in with the "plumbing". On the other hand,
traditional J2EE development with EJB entails writing a lot of
"plumbing" code which weighs you down conceptually.
Hope it helps.

Can we extend Spring source code when working for a commercial app? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
I always have used Spring Framework classes as-is.
However I am thinking of customizing the Spring-WS (WebService) behavior by extending its WebServiceTemplate class.
The WebServiceTemplate currently offers only 'sendAndReceive', but I want to make it do only a 'send'. And then a separate thread do a 'receive'. (This is being done to mirror existing work flow that relies on Messaging).
So I was thinking of extending the class..
What sort of things do I need to be aware of, before extending from an Open Source code, for a commercial app? Also, Am I free to use the source code and copy it as need be?
UPDATE:
Looks like Spring uses same license as Apache
http://www.apache.org/licenses/LICENSE-2.0
Spring-WS use Apache License. You are free to modify and use in commercial project. There are some restrictions (e.g., you can't use the Spring trademark), but this should be ok for most projects.

Spring or CDI or EJB3 [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I am pretty new to the concept of dependency injection and we are currently writing an web app using JSF and maybe Primefaces. We are currently evaluating whether to use Spring or EJB3. I was realy close to choose Spring, but then I heard about CDI. Can you give us some hints, which could be the best for the following situation:
We are currently pretty new to the J2EE world and don't know if we will use Glassfish or JBoss (or can simply stick to Tomcat).
The web app is basically a prototype for an enterprise CRUD application that needs to be able to handle complex business logic. We want to focus on "adaptability", as some requirements are not clear and will be decided about a year later (when we know if we can still use the prototype).
We can't use Hibernate, as we will have to write pretty complex SQL Statements. Currently we made good experiences with the SQL abstraction in Spring.
Maybee I am currently comparing apples and oranges, but there are just too many information's, if you are new to j2ee. I think that EJB's are the standard defined through JCP, Spring is the standard defined by the market and CDI is a standard that is also defined by the JCP to do what Spring can do. But I am most certainly wrong ;-).
Thx,
iuiz
Lincoln Baxter does an excellent job explaining the technical differences in this article: http://ocpsoft.com/java/spring-to-java-ee-a-migration-guide-cdi-jsf-jpa-jta-ejb/ Long story short: both Spring and CDI will both be able to provide dependency injection. One is a Java EE standard, the other a commonly known technology. Glassfish and JBoss both run Spring apps and CDI apps without problem. As far as not being able to use Hibernate, it's not the case that you cannot use native SQL within Hibernate. Save your team a lot of extra dead-simple CRUD code if you can.

Resources