We are using graphql .net (Apollo Server)
Is the a way to change the URL endpoint?
So from
http://localhost:xxx/graphql
I want it to be
http://localhost:xxx/newEndpoint
OK i just figured it out, it's pretty simple.
On the server side all you have to do it state the endpoint you desire when configuring the server.
app.UseGraphQL<YourSchema>("/yourNewEndPoint");
on the client side you also need to modify the uri you are passing to httpLink
const http = httpLink.create({ uri: 'http://localhost:port/yourNewEndPoint' });
Copyright © 2021 Jogjafile Inc.
OK i just figured it out, it's pretty simple.
On the server side all you have to do it state the endpoint you desire when configuring the server.
app.UseGraphQL<YourSchema>("/yourNewEndPoint");on the client side you also need to modify the uri you are passing to httpLink