Closed mrjackyliang closed 6 years ago
Hi there,
400 looks like maybe there is a typo somewhere in the request you are making. Can you upload the query you are making to our GraphQL endpoint?
This is the query we're making. We also tried it in a test, and that worked.
{
search(location: "san francisco") {
total
business {
name
}
}
}
Query looks good to me. Just tested myself as well via command-line.
I see that you are using React-Native. Correct me if I am wrong, but your code snippet seems to be creating the ApolloClient in a React component. If so, this will cause a CORS error when the ApolloClient makes the fetch request, which we do not currently support (see https://github.com/Yelp/yelp-fusion/issues/64 for workarounds to this issue).
How do we go forward with that?
I found that the request isn’t being created inside a React component.
The component calls the function which the function loads the class via an instance.
Overview
Description
Trying to do a business search, but get's error 400 instead with no reason why.
Endpoint
Fusion Search API
Parameters or Sample Request
Response
Extra information
Error information from remote js debugger (react native)