Skip to content

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

Open
@jvanmelckebeke

Description

@jvanmelckebeke

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions