wso2 / docker-apim

Docker and Docker Compose resources for WSO2 API Manager
Apache License 2.0
143 stars 215 forks source link

WSO2 Installation Bug: GraphQL API Schema Endpoint Requires Restart #512

Open saber13812002 opened 4 months ago

saber13812002 commented 4 months ago

Description:

I encountered a bug in WSO2. We installed WSO2 all-in-one on our machine four times for learning purposes for http (no https). However, it requires a restart to apply the GraphQL API with the schema endpoint. I am not sure if this is necessary for other types of endpoints, but it definitely applies to the GraphQL API

Affected Product Version:

wso2/wso2am:4.3.0

OS, DB, other environment details and versions:

Steps to reproduce:

1- run it with docker desktop or linux version 2- create new api with wizard in publishing and upload schema. edit api-configuration>runtime> uncheck https then deploy and publish 3- test it to get response from endpoint

Related Issues: Sure, here's a detailed step-by-step guide:

Step 1: Running WSO2 with Docker Desktop or Linux Version

Docker Desktop

  1. Install Docker Desktop:

  2. Pull WSO2 Docker Image:

    • Open your terminal and run:
      docker pull wso2/wso2am:4.3.0
  3. Run WSO2 Container:

    • Run the following command to start the WSO2 API Manager:
      docker run -it -p 9443:9443 -p 8243:8243 -p 8280:8280 wso2/wso2am:4.3.0

Step 2: Create New API with Wizard and Upload Schema

  1. Access WSO2 Publisher:

    • Open your web browser and navigate to https://localhost:9443/publisher.
  2. Login:

    • Use the default credentials: admin/admin.
  3. Create a New API:

    • Click on CREATE API and select GraphQL API.
  4. API Creation Wizard:

    • Name: Enter a name for your API.
    • Context: Define the context path (e.g., /context).
    • Version: Enter the API version.
    • Schema: Upload your GraphQL schema file.
  5. Deploy and Publish:

    • edit it api-configuration>runtime> uncheck https
    • Click Next to proceed through the wizard.
    • Deploy the API by clicking on Deploy.
    • Finally, click on Publish to make the API available.

Step 3: Test the API to Get a Response from the Endpoint

  1. Access the Developer Portal:

    • Open your web browser and navigate to https://localhost:9443/devportal.
  2. Login:

    • Use the default credentials: admin/admin.
  3. Subscribe to the API:

    • Find your published API.
    • Click on Subscribe and select an application or create a new one.
  4. Generate Access Token:

    • After subscribing, generate an access token for your application.
  5. Test the API:

    • Use a tool like Postman or the built-in API console in the Developer Portal.
    • Send a request to your API endpoint using the access token.
    • Example endpoint: http://ip:8280/context/version.
    • Check the response to ensure your GraphQL API is functioning correctly.

Following these steps will help you run WSO2, create a new API with the wizard, upload the schema, deploy, publish, and test the API.

in last 4 installation in 4 machines 3 windows and one of them linux we need restart after these steps