frankcollins3 / PHPokedex

react concepts
0 stars 0 forks source link

GraphQL && puppeteer [7:32pm] #30

Closed frankcollins3 closed 1 year ago

frankcollins3 commented 1 year ago

Screen Shot 2023-05-09 at 7 29 12 PM

perhaps its the scope or the method in which I'm invoking the puppeteer methods. if I comment the puppeteer code, the return "im back" statement executes and is returned through GraphQL API to client.

I get a failed to fetch issue if the code is executed.

first proposed approach: put the puppeteer functionality in a callback function thats out of GraphQL API scope. test GraphQL with a fetch to return the string value (already confirmed to work)

Invoke that function as the only other code within the resolve: () => { } statement besides the return string statement.

frankcollins3 commented 1 year ago

Screen Shot 2023-05-09 at 7 35 21 PM

wrong it worked. A headless browser means you won't see any of the executions.

true ventriloquist && puppet

[7:36pm]