Add authentication token with webix graphql

How can we pass authentication with webix graphql

webix.proxy("GraphQL", GetMenuGqlQuery)

Where to add authentication

Comments

  • Hello @chetu_webosphere,

    How can we pass authentication with webix graphql

    If you plan on transferring the authentication token through AJAX headers, you can do something like the following:

    webix.attachEvent("onBeforeAjax", function(mode, url, data, request, headers) { headers["jwt-token"] = JWTToken; });
    

    The above code will add the extra headers to all AJAX calls, including the GraphQL ones.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion