cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Install graphQL REST API add-on

oguimard
MEGA

Install graphQL REST API add-on

️ Follow this step to install the GraphQL REST API add-on on HOPEX V3. You will learn in this video how to proceed the wizard, how to cnfigure the Web.config, configure IIS and adjust access rights.

 

15 Replies

Hello,

 

could you share with me on a private message an architecture diagram of the deployment you have put in place ?

 

  • Where did you install HOPEX front-end : folder wwwroot / MWAS
  • Where did you install HOPEx Back-end : folder program file \mega
  • Where did you install HOPEX orchestrator : SSP / WatchDog

 

  • Does UAS is enabled and work in this deployment ?
  • When you say you have a white screen you are talking of GraphiQL ?
  • Did you try your request in Postman ?

 

Regards,

RGenin
Trusted Contributor

Hi Olivier, 

 

We tried to upgrade to the last GraphQL library, but now it is not working anymore:

 

Previous working: Mega.WebService.GraphQL.Setup-787_502-5437

Tried: Mega.WebService.GraphQL.Setup-787_504-iqa-5561

We are in our DEV env on 3 CP4 HF1

 

Error Msg:

 

{
  "Message": "An error has occurred.",
  "ExceptionMessage": "Method not found: 'System.Net.Http.HttpRequestMessage System.Web.Http.Filters.HttpAuthenticationContext.get_Request()'.",
  "ExceptionType": "System.MissingMethodException",
  "StackTrace": "   at Mega.WebService.GraphQL.Filters.HopexAuthenticationFilter.<AuthenticateAsync>d__3.MoveNext()\r\n   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)\r\n   at Mega.WebService.GraphQL.Filters.HopexAuthenticationFilter.AuthenticateAsync(HttpAuthenticationContext context, CancellationToken cancellationToken)\r\n   at System.Web.Http.Controllers.AuthenticationFilterResult.<ExecuteAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()"
}

 

RGenin_0-1593809722488.png

 

We have made sure that replaced the  <secureAppSettings> portion in web.config with the values from HOPEX.

 

Postman works except when we try to hit an URL containing HOPEXGraphQL

 

{
    "Message": "An error has occurred.",
    "ExceptionMessage": "Method not found: 'System.Net.Http.HttpRequestMessage System.Web.Http.Filters.HttpAuthenticationContext.get_Request()'.",
    "ExceptionType": "System.MissingMethodException",
    "StackTrace": "   at Mega.WebService.GraphQL.Filters.HopexAuthenticationFilter.<AuthenticateAsync>d__3.MoveNext()\r\n   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)\r\n   at Mega.WebService.GraphQL.Filters.HopexAuthenticationFilter.AuthenticateAsync(HttpAuthenticationContext context, CancellationToken cancellationToken)\r\n   at System.Web.Http.Controllers.AuthenticationFilterResult.<ExecuteAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()"
}

 

RGenin_1-1593809888310.png

What can we do ?

Thanks !

 

If it was working before and it's not, the most commonly seen error with this message is an issue with the .NEt Framework version. The system get confused in the DLL to take.

 

Install latest 4.8 .Net Framework will solve the problem.

 

RGenin
Trusted Contributor

Thanks Olivier. 

It works.
We had the Developer Pack installed and somehow there was a conflict or something. Now with just the Runtime 4.8 installed, it works perfectly.

 

ToddDavey
Contributor

Hi,

 

I am running HOPEX V3.00.02 (7.87.5382.5439) and have just tried installing HOPEXGraphQL add-on.

After following the instructions I get the following message:  "GraphiQL & Voyager services are not available".  I have checked all the config files as instructed in the video and everything seems correct.  Any suggestions?

Hello,

 

First the latest GraphQL add-on is valid from HOPEX V3 CP4. Running with prévious CP will not work or maybe subject to loss of data.

 

Second, with the first production release a security setting is set by default on GraphiQL. It does not prevent you to execute query by programming.

 

Third to turn on GraphiQL you must enable it on the web.config located in C:\inetpub\wwwroot\HOPEXGraphQL

 

    <add key="EnableTestingWebService" value="true"/>
    <!--      EnableTestingWebService-->

 

Enjoy GraphQL 🙂