Skip to content

[Bug]: GraphQL Datasource URL Validation Issue in Lowcoder Docker Environment #1682

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

Open
1 task done
jvanmelckebeke opened this issue May 6, 2025 · 0 comments
Open
1 task done

Comments

@jvanmelckebeke
Copy link

jvanmelckebeke commented May 6, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When creating a GraphQL datasource in Lowcoder running in a Docker Compose environment, the URL validation rejects valid Docker service names without domain suffixes. Specifically, when attempting to connect to a GraphQL API using the Docker service name (e.g., http://api:8000/graphql), Lowcoder shows the error "Please Enter a Correct URL".

Image

However, URLs with domain-like suffixes (e.g., http://api.foobar:8000/graphql) are accepted.

Image

Expected Behavior

Lowcoder's GraphQL datasource URL validation should accept standard Docker service names as valid hostnames without requiring domain suffixes, allowing seamless integration with other services in the same Docker Compose network.

Steps to reproduce

  1. Set up a Docker Compose environment with Lowcoder and a GraphQL API service (named "api" running on port 8000)
  2. Navigate to Lowcoder's datasource creation page
  3. Select GraphQL as the datasource type
  4. Enter a name for the datasource (e.g., "graphql-api")
  5. In the URL field, enter http://api:8000/graphql
  6. Observe the validation error: "Please Enter a Correct URL"
  7. Change the URL to include a fake domain suffix: http://api.foobar:8000/graphql
  8. Note that this URL is accepted despite only differing by the addition of a fake domain suffix

Environment

Lowcoder version: Lowcoder CE v2.6.5
Deployment: Docker Compose
Browser: Firefox
OS: Arch Linux
Docker Compose configuration: Multi-container setup with Lowcoder and GraphQL API service

Additional Information

The issue appears to be specific to the GraphQL datasource, as other types of connections may not exhibit the same validation constraints.

Current workaround: Add a dns alias to the docker service you're trying to reach. e.g.

services:
  api:
    # Your existing configuration
    networks:
      default:
        aliases:
          - api.internal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant