Why need a server for running GraphQL
I am totally new in GraphQL. So many things are confusing for me like why i need a server for running GraphQL as why some library doesn't sort out the implementation.
As far as i know server is for respond data. So what else it will do for GraphQL.
graphql apollo-server
add a comment |
I am totally new in GraphQL. So many things are confusing for me like why i need a server for running GraphQL as why some library doesn't sort out the implementation.
As far as i know server is for respond data. So what else it will do for GraphQL.
graphql apollo-server
add a comment |
I am totally new in GraphQL. So many things are confusing for me like why i need a server for running GraphQL as why some library doesn't sort out the implementation.
As far as i know server is for respond data. So what else it will do for GraphQL.
graphql apollo-server
I am totally new in GraphQL. So many things are confusing for me like why i need a server for running GraphQL as why some library doesn't sort out the implementation.
As far as i know server is for respond data. So what else it will do for GraphQL.
graphql apollo-server
graphql apollo-server
asked Nov 15 '18 at 5:12
Fatema tuz johuraFatema tuz johura
113
113
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
GraphQL is a query language for APIs and a runtime for fulfilling
those queries with your existing data. GraphQL provides a complete and
understandable description of the data in your API, gives clients the
power to ask for exactly what they need and nothing more, makes it
easier to evolve APIs over time, and enables powerful developer tools.
https://graphql.org/
Essentially, you have a client side and a server side. The client requests (query) data from the server, or requests the server to update data (mutation). If you're working on the client side only, you don't need a server (given it already exists).
This link may also be helpful: https://www.apollographql.com/why-graphql
Hope this makes sense?
add a comment |
As you note, it's "just" a query language, and you don't need a server per se. For example, in the reference graphql-js implementation, you can just call graphql
with a query; similarly, in graphql-ruby, you can #execute
a query on a schema object.
The usual case for GraphQL "in the wild" is as an API layer, though. You'd have a GraphQL interface over a native database, or as an alternative to a REST API. In both of those cases if you were calling something from the same system you wouldn't usually go through GraphQL just to translate it into, say, SQL; you'd directly call the database layer.
You might compare GraphQL to to SQL, where there are also library-based implementations but the query language is the only way to interact with the system; and also to other API layers like SOAP, which use HTTP as a minimal transport layer but don't really use the full expressiveness of the protocol.
add a comment |
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53312826%2fwhy-need-a-server-for-running-graphql%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
GraphQL is a query language for APIs and a runtime for fulfilling
those queries with your existing data. GraphQL provides a complete and
understandable description of the data in your API, gives clients the
power to ask for exactly what they need and nothing more, makes it
easier to evolve APIs over time, and enables powerful developer tools.
https://graphql.org/
Essentially, you have a client side and a server side. The client requests (query) data from the server, or requests the server to update data (mutation). If you're working on the client side only, you don't need a server (given it already exists).
This link may also be helpful: https://www.apollographql.com/why-graphql
Hope this makes sense?
add a comment |
GraphQL is a query language for APIs and a runtime for fulfilling
those queries with your existing data. GraphQL provides a complete and
understandable description of the data in your API, gives clients the
power to ask for exactly what they need and nothing more, makes it
easier to evolve APIs over time, and enables powerful developer tools.
https://graphql.org/
Essentially, you have a client side and a server side. The client requests (query) data from the server, or requests the server to update data (mutation). If you're working on the client side only, you don't need a server (given it already exists).
This link may also be helpful: https://www.apollographql.com/why-graphql
Hope this makes sense?
add a comment |
GraphQL is a query language for APIs and a runtime for fulfilling
those queries with your existing data. GraphQL provides a complete and
understandable description of the data in your API, gives clients the
power to ask for exactly what they need and nothing more, makes it
easier to evolve APIs over time, and enables powerful developer tools.
https://graphql.org/
Essentially, you have a client side and a server side. The client requests (query) data from the server, or requests the server to update data (mutation). If you're working on the client side only, you don't need a server (given it already exists).
This link may also be helpful: https://www.apollographql.com/why-graphql
Hope this makes sense?
GraphQL is a query language for APIs and a runtime for fulfilling
those queries with your existing data. GraphQL provides a complete and
understandable description of the data in your API, gives clients the
power to ask for exactly what they need and nothing more, makes it
easier to evolve APIs over time, and enables powerful developer tools.
https://graphql.org/
Essentially, you have a client side and a server side. The client requests (query) data from the server, or requests the server to update data (mutation). If you're working on the client side only, you don't need a server (given it already exists).
This link may also be helpful: https://www.apollographql.com/why-graphql
Hope this makes sense?
edited Nov 16 '18 at 22:36
answered Nov 15 '18 at 23:08
Mikael LirbankMikael Lirbank
1,2471213
1,2471213
add a comment |
add a comment |
As you note, it's "just" a query language, and you don't need a server per se. For example, in the reference graphql-js implementation, you can just call graphql
with a query; similarly, in graphql-ruby, you can #execute
a query on a schema object.
The usual case for GraphQL "in the wild" is as an API layer, though. You'd have a GraphQL interface over a native database, or as an alternative to a REST API. In both of those cases if you were calling something from the same system you wouldn't usually go through GraphQL just to translate it into, say, SQL; you'd directly call the database layer.
You might compare GraphQL to to SQL, where there are also library-based implementations but the query language is the only way to interact with the system; and also to other API layers like SOAP, which use HTTP as a minimal transport layer but don't really use the full expressiveness of the protocol.
add a comment |
As you note, it's "just" a query language, and you don't need a server per se. For example, in the reference graphql-js implementation, you can just call graphql
with a query; similarly, in graphql-ruby, you can #execute
a query on a schema object.
The usual case for GraphQL "in the wild" is as an API layer, though. You'd have a GraphQL interface over a native database, or as an alternative to a REST API. In both of those cases if you were calling something from the same system you wouldn't usually go through GraphQL just to translate it into, say, SQL; you'd directly call the database layer.
You might compare GraphQL to to SQL, where there are also library-based implementations but the query language is the only way to interact with the system; and also to other API layers like SOAP, which use HTTP as a minimal transport layer but don't really use the full expressiveness of the protocol.
add a comment |
As you note, it's "just" a query language, and you don't need a server per se. For example, in the reference graphql-js implementation, you can just call graphql
with a query; similarly, in graphql-ruby, you can #execute
a query on a schema object.
The usual case for GraphQL "in the wild" is as an API layer, though. You'd have a GraphQL interface over a native database, or as an alternative to a REST API. In both of those cases if you were calling something from the same system you wouldn't usually go through GraphQL just to translate it into, say, SQL; you'd directly call the database layer.
You might compare GraphQL to to SQL, where there are also library-based implementations but the query language is the only way to interact with the system; and also to other API layers like SOAP, which use HTTP as a minimal transport layer but don't really use the full expressiveness of the protocol.
As you note, it's "just" a query language, and you don't need a server per se. For example, in the reference graphql-js implementation, you can just call graphql
with a query; similarly, in graphql-ruby, you can #execute
a query on a schema object.
The usual case for GraphQL "in the wild" is as an API layer, though. You'd have a GraphQL interface over a native database, or as an alternative to a REST API. In both of those cases if you were calling something from the same system you wouldn't usually go through GraphQL just to translate it into, say, SQL; you'd directly call the database layer.
You might compare GraphQL to to SQL, where there are also library-based implementations but the query language is the only way to interact with the system; and also to other API layers like SOAP, which use HTTP as a minimal transport layer but don't really use the full expressiveness of the protocol.
answered Nov 15 '18 at 23:46
David MazeDavid Maze
15.7k31531
15.7k31531
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53312826%2fwhy-need-a-server-for-running-graphql%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown