First of all, we need to create the Apollo client which requires at least 2 things: a Cache and a Http-link.

Minimal Http-link:

let httpLink = ApolloLinks.createHttpLink(

~uri=“http://127.0.0.1:3010/graphql",

()

);

And a default Cache:

let inMemoryCache = ApolloInMemoryCache.createInMemoryCache(());

You can now use those 2 to create the client:

module Client = ReasonApollo.CreateClient({

let apolloClient = ReasonApollo.createApolloClient(

~cache=inMemoryCache,

~link=httpLink,

()

);

});

With this client, you will now be able to execute Queries and Mutations .