I need to call GraphQL API (Shopify Storefront API) from my Spring Boot app and I can`t find any source where described which libraries I can use for that. Can you suggest library or can someone describe how I can setup Apollo Client for my Spring Boot app and run query/mutations from my Spring Boot app to Shopify. Your help is appreciated.
The Spring Boot GraphQL Starter offers a fantastic way to get a GraphQL server running in a very short time. Combined with the GraphQL Java Tools library, we need only write the code necessary for our service.
You can use the GraphQL SPQR in pretty much any Java environment, even with Micronaut.
A GraphQL server is a server-side implementation of the GraphQL spec. In other words, a GraphQL server exposes your data as a GraphQL API that your client applications can query for data. These clients could be a single page application, a CMS like Drupal, a mobile app, or almost anything.
1. Apollo-Client. Apollo-Client is a comprehensive JavaScript library used for managing local and remote data with GraphQL. It has many benefits like state management, fetching, caching, and modifying application data.
You could use Apollo Android, which the documentation says is not just for Android, but any Java/Kotlin application.
You could also just go old-school and use HTTP POSTS from Spring and handle the response yourself (but you would lose type-safety features).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With