The collection of all points whose coordinates satisfy a given relation (such as a function)
An open-source data query and manipulation language for APIs, and a runtime for fulfilling queries with existing data
https://www.merriam-webster.com/dictionary/graph
export default function talk() {
return {
title: "Let's Build a Graph",
presenters: [{
name: "Joe Fleming",
alias: "w33ble"
}],
};
}
type Talk {
title: String!
presenters: [Presenter]!
}
type Presenter {
name: String!
alias: String
}
type Query {
talk: Talk!
}
export default function talk() {
return {
title: "Let's Build a Graph",
presenters: [{
name: "Joe Fleming",
alias: "w33ble"
}],
};
}
export default {
Query: {
talk() {
return {
title: "Let's Build a Graph",
presenters: [{
name: "Joe Fleming",
alias: "w33ble"
}],
};
}
},
};
Used to add, update, and delete data from your API. Equivalent to a PUT, POST, and DELETE requests in REST.
Reading data from your GraphQL API. Equivalent to a GET request in REST, used for reading data.
It doesn't matter if you are querying or mutating data, all requests are POST requests
Your entire graph is accessible through a single endpoint, usually /graphql
{
talk {
title
presenters {
name
alias
}
}
}
$ curl -XPOST \
--url http://localhost:4000/graphql \
-d '{"query":"{ talk { title, presenters { name, alias } } }"}'