Possible to host graphql server in ApigeeX?

Hi, 

Can you Please provide clarification for below,

I have created graphQL server in Springboot code. Is this possible to deploy as a jar in java callout policy?

or any other option to host graphQL server in ApigeeX?

Solved Solved
0 5 198
1 ACCEPTED SOLUTION

No

A good place to host server logic is in Cloud Run.  Then use Apigee as the API Gateway layer in front of that service. 

Hosting servers as Java callouts within Apigee is an anti-pattern!  Apigee is not a general-purpose application hosting system.  Cloud run is a general-purpose, container oriented hosting system!  You can build a server in spring boot and deploy to cloud run from your workstation. It's really cool!  

 

View solution in original post

5 REPLIES 5

No

A good place to host server logic is in Cloud Run.  Then use Apigee as the API Gateway layer in front of that service. 

Hosting servers as Java callouts within Apigee is an anti-pattern!  Apigee is not a general-purpose application hosting system.  Cloud run is a general-purpose, container oriented hosting system!  You can build a server in spring boot and deploy to cloud run from your workstation. It's really cool!  

 

Thanks for the update.

Shall i use SpringBoot jar in Apigee X java callout?

For java callout public ExecutionResult execute(MessageContext messageContext, ExecutionContext executionContext) is an entry point but for springboot code public static void main(String[] args) {SpringApplication.run(BookDetailsApplication.class, args);}is an entry point for springboot code. Will this combination work in java callout?

I think this followup question is premised on the idea that it is OK to try to host  a SpringBoot server in an Apigee Java callout.  As my previous answer made clear, that is a bad idea. I am not sure if it will "work," for the initial deploy but it definitely will not "work" for reliable service.  You should use something else to host your SpringBoot server. Cloud Run is a good option. But I am repeating myself.

Given that, the question "can I use SpringBoot jar in an Apigee X callout?" is moot. 

 

yes, your right i tried simple springBoot app deployed as jar in java callout and the result is 500 Internal server error.