On Thu, Jul 11, 2019 at 10:41 AM Malintha Amarasinghe <malint...@wso2.com> wrote:
> > > On Thu, Jul 11, 2019 at 10:28 AM Sanjeewa Malalgoda <sanje...@wso2.com> > wrote: > >> >> >> On Wed, Jul 10, 2019 at 7:14 PM Malintha Amarasinghe <malint...@wso2.com> >> wrote: >> >>> >>> On Wed, Jul 10, 2019 at 6:30 PM Hiranya Abeyrathne <hiran...@wso2.com> >>> wrote: >>> >>>> +adding dev@wso2.org >>>> >>>> Hiranya Abeyrathne >>>> Software Engineer, >>>> >>>> *WSO2, Inc. * >>>> >>>> lean. enterprise. middleware >>>> Mob: +94 70210 8657 >>>> LinkedIn: https://www.linkedin.com/in/hiranya-kavishani/ >>>> >>>> <http://wso2.com/signature> >>>> >>>> >>>> On Wed, Jul 10, 2019 at 6:16 PM Harsha Kumara <hars...@wso2.com> wrote: >>>> >>>>> Pleas use dev mailing thread for the public discussions. >>>>> >>>>> On Wed, Jul 10, 2019 at 6:13 PM Hiranya Abeyrathne <hiran...@wso2.com> >>>>> wrote: >>>>> >>>> >>> Adding some points we discussed offline : >>> >>> >>>> Hi all, >>>>>> >>>>>> This is regarding a problem which has been encountered during the >>>>>> graphQL implementation. >>>>>> >>>>>> Currently, we have stored the swagger definition of an API at the >>>>>> registry and it contains the global scopes which have been created for an >>>>>> API. Once these created scopes are registered to resources, we store them >>>>>> in the DB. But in the graphQL schema, we are not able to store global >>>>>> scopes. AFAIK, there are two options that we can use to solve this >>>>>> problem >>>>>> for GraphQL APIs. >>>>>> >>>>>> 1. *Global scopes in GraphQL APIs, will not be stored in any >>>>>> persistence storage. (*Once the user creates a global scope, it >>>>>> should be assigned to an operation at the same time) >>>>>> >>>>> Then any scopes that are not assigned to any operation will be lost >>> when refreshing. But this does not require additional resources (like a >>> swagger below) >>> >> What does it mean by global scope? In store what we do is create scopes >> in API level and assign them to one or more resources. Did i missed >> something? >> > No Sanjeewa that's correct. It is actually the scopes created in API level > (which becomes ultimately global since we can't assign them to any other > APIs). > > If we take a normal REST API, if we created a scope called read_api but > didn't assign it to any resource, the mapping available for it to the > particular API is only inside the swagger. For graphQL APIs, we didn't plan > to add a swagger so this information will lose. But if we assign that scope > to a resource, it will be added to the URL mapping table. So, any scopes > that are not assigned to any resource, are likely to lose (if we refresh > the page) in the current approach. > Yes. The scopes which are created in API level, are stored in the IDN_SCOPE related tables, only when they are assigned to resources. Therefore, we can go with either fist/second option which has been mentioned above or is there any other better option to handle this? > >> Thanks, >> sanjeewa. >> >>> >>> >>>> >>>>>> 2. *Creating a swagger definition for graphQL API and storing it in >>>>>> the registry. (*Then the registry will store both the graphQL schema >>>>>> and the swagger definition) >>>>>> >>>>> This is basically including the mandatory resources of graphQL API >>> (eg: GET, POST /*) and the global set of scopes (scopes element at the top >>> of the swagger). The global scope set won't be lost like first option. >>> >>> Thanks! >>> >>> >>>> >>>>>> Your valuable input in this regard is highly appreciated. >>>>>> >>>>>> Thanks! >>>>>> Hiranya Abeyrathne >>>>>> Software Engineer, >>>>>> >>>>>> *WSO2, Inc. * >>>>>> >>>>>> lean. enterprise. middleware >>>>>> Mob: +94 70210 8657 >>>>>> LinkedIn: https://www.linkedin.com/in/hiranya-kavishani/ >>>>>> >>>>>> <http://wso2.com/signature> >>>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> *Harsha Kumara* >>>>> >>>>> Technical Lead, WSO2 Inc. >>>>> Mobile: +94775505618 >>>>> Email: hars...@wso2.coim >>>>> Blog: harshcreationz.blogspot.com >>>>> >>>>> GET INTEGRATION AGILE >>>>> Integration Agility for Digitally Driven Business >>>>> >>>> >>> >>> -- >>> Malintha Amarasinghe >>> *WSO2, Inc. - lean | enterprise | middleware* >>> http://wso2.com/ >>> >>> Mobile : +94 712383306 >>> >> >> >> -- >> *Sanjeewa Malalgoda* >> Software Architect | Associate Director, Engineering - WSO2 Inc. >> (m) +94 712933253 | (e) sanje...@wso2.com | (b) Blogger >> <http://sanjeewamalalgoda.blogspot.com>, Medium >> <https://medium.com/@sanjeewa190> >> >> GET INTEGRATION AGILE <https://wso2.com/signature> >> Integration Agility for Digitally Driven Business >> > > > -- > Malintha Amarasinghe > *WSO2, Inc. - lean | enterprise | middleware* > http://wso2.com/ > > Mobile : +94 712383306 > Hiranya Abeyrathne Software Engineer, *WSO2, Inc. * lean . enterprise . middleware Mob: +94 70210 8657 LinkedIn: https://www.linkedin.com/in/hiranya-kavishani/ <http://wso2.com/signature>
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev