Hi Wasura, Not sure whether the TEST button(invokes http HEAD) in implement page will work for graphQL endpoints. Might have to disable if it doesn't. Currently, this doesn't work for WebSocket endpoints as well.
What we are doing here is only adding design-time(UI) support for graphQL APIs right? Are we doing any change to the gateway to support these calls(I assume we don't need to)? On Fri, Jan 25, 2019 at 4:48 PM Wasura Wattearachchi <[email protected]> wrote: > Hi all, > > This is related to the issue [1] created on APIM Github about *GraphQL*. > Please find the identified requirements and the approach which are > suggested as below. > > Requirement Analysis > > - > > GraphQL is developed by Facebook which is an alternative to REST. It > is a query language for APIs where a particular user can specify exactly > what data is needed from an API. > - > > We know that we can use a Swagger Definition (Open API Specification) > to design a REST API. But in GraphQL, we can use Schema Definition > Language (SDL) to write the schema for a GraphQL API. > - > > Invoking a GraphQL API simply means fetching data using GraphQL > queries and writing data using GraphQL mutations. > - > > In here our requirement is to give the support from WSO2 APIM in order > to create and publish a GraphQL API and to invoke it over https/http. > > > Suggested Approach > > - > > When publishing a GraphQL API we request the user (publisher) to > upload the schema file which consists the definition. Then the user can > fill the details about the API such as name, version, context etc. But the > user will not be asked to create the resources for GET, POST methods > when creating the API. > > > > > > - > > Next, in the Implement tab, if the user selects, > - > > Manage API > - > > Endpoint Type should be set to HTTP/REST Endpoint automatically. > (The user must not have the ability to change this) > - > > A user must have the ability to change the Endpoint (Production > and Sandbox) as usual. > - > > Other fields should remain the same. > > > > > > - > > Prototyped API > - > > In Inline implementation method, two GET and POST methods must be > automatically created and displayed as displayed in the following > screenshot. > > > > > > - > > If you choose Manage API option then you have to set the settings in > Manage tab. > - > > In here the same procedure must be followed. > - > > Especially as in Inline prototype method, two GET and POST methods > must be automatically created and displayed as in the following > screenshot. > > > > > > - > > After the API is published or prototyped > - > > The API should be labeled as a GraphQL API in API Store. > - > > A consumer must have the ability to download the schema file of > that API through API Store. > > > Your feedback will be hugely appreciated. > > [1] https://github.com/wso2/product-apim/issues/3184 > > Thank you! > -- > Wasura Wattearachchi | Software Engineer Intern | WSO2 Inc. > (m) +94775396038 | (e) [email protected] > <http://wso2.com/signature> > _______________________________________________ > Architecture mailing list > [email protected] > https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture > -- Thanks & Regards, *Fazlan Nazeem* Associate Technical Lead WSO2 Inc Mobile : +94772338839 [email protected]
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
