React SDK is not in sync with Courier API

By default hooks from latest @trycourier/react-hooks (^1.53.1) will make queries to an unusual URL: https://fxw3r7gdm9.execute-api.us-east-1.amazonaws.com/production/q
I guess it was supposed to be production but it’s not. The request is passing auth (clientKey) but it doesn’t get any messages.
For example, component from @trycourier/react-inbox will make requests to https://api.courier.com/client/q and return all my messages successfully with the same provider. So I guess the database is different.
If I change apiUrl to https://api.courier.com/client/q then it will not work for hooks again, GraphQL schema is different at endpoints.

So this code:

export default function Inbox() {
  return (
    <CourierProvider
      apiUrl="https://api.courier.com/client/q"
      userId={USER_ID}
      clientKey={MY_KEY}
    >
        <CustomCourierInbox />
    </CourierProvider>
  );
}

function CustomCourierInbox() {
  const inbox = useElementalInbox();

  useEffect(() => {
    inbox.fetchMessages();
  }, []);

  return (
    <div>
      {inbox?.messages?.map((message, index) => (
        <div key={index}>{message?.body}</div>
      ))}
    </div>
  );
}

Will make the following query: query GetInboxMessages($params: FilterParamsInput, $limit: Int = 10, $after: String) {\n messages(params: $params, limit: $limit, after: $after) {\n totalCount\n pageInfo {\n startCursor\n hasNextPage\n __typename\n }\n nodes {\n title\n preview\n messageId\n read\n created\n actions {\n background_color\n content\n href\n style\n __typename\n }\n __typename\n }\n __typename\n }\n

At https://api.courier.com/client/q this query will fail:

[
    {
        "message": "Cannot query field \"title\" on type \"Messages\".",
        "locations": [
            {
                "line": 10,
                "column": 7
            }
        ],
        "extensions": {
            "code": "GRAPHQL_VALIDATION_FAILED"
        }
    },
    {
        "message": "Cannot query field \"preview\" on type \"Messages\".",
        "locations": [
            {
                "line": 11,
                "column": 7
            }
        ],
        "extensions": {
            "code": "GRAPHQL_VALIDATION_FAILED"
        }
    },
    {
        "message": "Cannot query field \"actions\" on type \"Messages\".",
        "locations": [
            {
                "line": 15,
                "column": 7
            }
        ],
        "extensions": {
            "code": "GRAPHQL_VALIDATION_FAILED"
        }
    }
]

This query will work though at https://fxw3r7gdm9.execute-api.us-east-1.amazonaws.com/production/q but it will not get any messages

Hi Andrew, so we’re in the process of building the new version of the inbox api (useElementalInbox) which currently is in beta. We added documentation about this useElementalInbox to our github for the people who are in the beta but we didn’t add that to the documentation.

Please use the “useInbox” hook for now and not the useElementalInbox as you won’t be able to get anything to return with the useElementalInbox unless you are part of the beta. This is a documentation lapse on our side and I apologize. I will get the docs fixed this week.