Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade bundled GraphiQL to version 3.0.6 #458

Merged
merged 9 commits into from
Oct 24, 2023

Conversation

guillermocalvo
Copy link
Contributor

No description provided.

@guillermocalvo guillermocalvo added the type: improvement A minor improvement to an existing feature label Oct 6, 2023
@guillermocalvo guillermocalvo requested a review from sdelamo October 6, 2023 10:52
@guillermocalvo guillermocalvo self-assigned this Oct 6, 2023
sdelamo
sdelamo previously approved these changes Oct 14, 2023
Copy link
Contributor

@sdelamo sdelamo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I run:

docs-examples:hello-world-java

But If I visit http://localhost:8080/graphiql the graphiql interface is not loaded. What am I missing?

@sonarcloud
Copy link

sonarcloud bot commented Oct 14, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@guillermocalvo
Copy link
Contributor Author

@sdelamo

I run:

docs-examples:hello-world-java

But If I visit http://localhost:8080/graphiql the graphiql interface is not loaded. What am I missing?

You are not supposed to run :micronaut-docs-examples:micronaut-hello-world-java:run directly.

It took me a while to figure out what the whole problem was. Turns out that the example application does not define any graphql.GraphQL bean:

The bean [GraphiQLController] is disabled because it is within the package [io.micronaut.configuration.graphql] which is disabled due to bean requirements: 
* No bean of type [class graphql.GraphQL] present within context

If you really wanted to see that app running and exposing GraphiQL, you would need to:

  1. Update existing dependencies from: testImplementation to: implementation.
  2. Add one more dependency implementation project(":micronaut-graphql").
  3. Copy classes GraphQLFactory and HelloDataFetcher from src/test to src/main.

I did that, went for http://localhost:8080/graphiql and ta-da! the latest version of GraphiQL showed up.

However, I'd like to reiterate that I don't think hello-world-java was designed as a tool to test GraphiQL locally. That has nothing to do with my changes, it's just the way it is.

@sdelamo sdelamo merged commit 1efafa4 into master Oct 24, 2023
13 checks passed
@sdelamo sdelamo deleted the 262-update-graphiql-default-version branch October 24, 2023 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: improvement A minor improvement to an existing feature
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Upgrade bundled GraphiQL to version 2 Update GraphiQL default version
2 participants