microcks: GraphQL schema instrospection not working on native distribution

Describe the bug

When fetching the GraphQL schema with a GraphQL introspection query, the native image returns an empty response ({}))

Expected behavior

We expected to received the full schema description.

Actual behavior

The response is a code 200 with empty content. Standard distribution works correctly returning the schema metadata.

How to Reproduce?

No response

Microcks version or git rev

nightly - 1.9.x

Install method (docker-compose, helm chart, operator, docker-desktop extension,…)

All

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (15 by maintainers)

Most upvoted comments

@lbroudoux can I work on this issue?

@lbroudoux I got the response 🥳. Screenshot 2024-08-14 at 10 38 44 PM

I am trying to add minimal changes in reflect-config.json then will raise a PR. Also, please tell on which branch I should raise a PR?

@lbroudoux I am still not able to get it. Still, one time I added below given code to reflect-config.json file and built it successfully and got the schema in introspection query.

{
    "name": "com.fasterxml.jackson.databind.ObjectMapper",
    "allDeclaredMethods": true,
    "allDeclaredConstructors": true
  }

Can you please check?

No idea sorry. It could be so many things. Maybe you could switch the log verbosity to DEBUG in logback.xml file? You’ll have to do this into the main webapp module…

Native image can be built from the distro/uber/ folder. Be sure to mvn install the whole project from root and then go to this folder. Edit the pom.xml and uncomment line 123 or line 125 depending on your machine. Run mvn -Pnative spring-boot:build-image -Dspring-boot.build-image.imageName=<your-handle>/microcks-uber:nightly-native This will produce a <your-handle>/microcks-uber:nightly-native container image you can run with a single docker run like explained in the Getting Started tutorials.

You can run the 1st GraphQL mock tutorial and try to issue an introspection query (see https://graphql.org/learn/introspection/). You can use either curl or a client like Insomnia or Postman.

You should get a correct answer when requesting against the regular or uber distro of Microcks and encounter an issue when using the uber-native distro. You can use quay.io/microcks/microcks-uber:nightly and quay.io/microcks/microcks-uber:nightly-native for that.