e01.org

GraphQL

GraphQL is a data query and manipulation language that allows specifying what data is to be retrieved ("declarative data fetching") or modified. A GraphQL server can process a client query using data from separate sources and present the results in a unified graph. The language is not tied to any specific database or storage engine. There are several open-source runtime engines for GraphQL.

GraphQL is a data query and manipulation language that allows specifying what data is to be retrieved ("declarative data fetching") or modified. A GraphQL server can process a client query using data from separate sources and present the results in a unified graph. The language is not tied to any specific database or storage engine. There are several open-source runtime engines for GraphQL. Fields are defined as nullable by default, and a trailing exclamation mark can be used to make a field non-nullable (required). A field can be defined as a list by wrapping the field's type in square brackets (for example, ). type Query { currentUser: User } type User { id: ID! name: String! } A GraphQL query defines the exact shape of the data needed by the client. query CurrentUser { currentUser { name age } } Once validated and executed by the GraphQL server, the data is returned in the same shape. { "currentUser": { "name": "John Doe", "age": 23 } } mutation CreateUser($name: String!, $age: Int!) { createUser(userName: $name, age: $age) { name age } } The variables are passed as an object with fields that match the variable names in the mutation. { "name": "Han Solo", "age": 42 } Once the operation is complete, the GraphQL server will return data matching the shape defined by the mutation. { "data": { "createUser": { "name": "Han Solo", "age": 42 } } } GraphQL also supports live updates sent from the server to client in an operation called a subscription. Again, the client defines the shape of the data that it needs whenever an update is made. subscription { newPerson { name age } } When a mutation is made through the GraphQL server that updates the associated field, data is sent to all subscribed clients in the format setup through the subscription. { "newPerson": { "name": "Jane", "age": 23 } }

References

  1. ^ "GraphQL" . facebook.github.io . Facebook . Archived from the original on 18 July 2018 . Retrieved 4 July 2018 . Wikipedia revision 1372636557, retrieved 2026-11-18 · 1794956400.0
  2. ^ "Introduction to GraphQL" . graphql.org . Retrieved 25 April 2023 . Wikipedia revision 1372636557, retrieved 2026-11-18 · 1794956400.0
  3. ^ "Execution" . graphql.org . Retrieved 25 April 2023 . Wikipedia revision 1372636557, retrieved 2026-11-18 · 1794956400.0
  4. ^ "Thinking in Graphs | GraphQL" . graphql.org . Retrieved 3 June 2025 . Wikipedia revision 1372636557, retrieved 2026-11-18 · 1794956400.0
  5. ^ "Schemas and Types | GraphQL" . graphql.org . Retrieved 3 June 2025 . Wikipedia revision 1372636557, retrieved 2026-11-18 · 1794956400.0
  6. ^ Vargas, D. M.; Blanco, A. F.; Vidaurre, A. C.; Alcocer, J. P. S.; Torres, M. M.; Bergel, A.; Ducasse, S. (2018). "Deviation Testing: A Test Case Generation Technique for GraphQL APIs" (PDF) . 11th International Workshop on Smalltalk Technologies (IWST) : 1– 9. Wikipedia revision 1372636557, retrieved 2026-11-18 · 1794956400.0
  7. ^ Karlsson, Stefan; Causevic, Adnan; Sundmark, Daniel (May 2021). "Automatic Property-based Testing of GraphQL APIs". 2021 IEEE/ACM International Conference on Automation of Software Test (AST) . Madrid, Spain: IEEE. pp. 1– 10. arXiv : 2012.07380 . doi : 10.1109/AST52587.2021.00009 . ISBN 978-1-6654-3567-3 . S2CID 229156477 . Wikipedia revision 1372636557, retrieved 2026-11-18 · 1794956400.0
  8. ^ GraphQL IDE Monorepo , GraphQL, 25 April 2023 , retrieved 25 April 2023 Wikipedia revision 1372636557, retrieved 2026-11-18 · 1794956400.0
  9. ^ "Learn GraphQL Fundamentals with Fullstack Tutorial" . www.howtographql.com . Retrieved 25 April 2023 . Wikipedia revision 1372636557, retrieved 2026-11-18 · 1794956400.0
  10. ^ "GraphQL: A data query language" . 14 September 2015. Wikipedia revision 1372636557, retrieved 2026-11-18 · 1794956400.0
  11. ^ "Facebook's GraphQL gets its own open-source foundation" . TechCrunch . Retrieved 7 November 2018 . Wikipedia revision 1372636557, retrieved 2026-11-18 · 1794956400.0
  12. ^ "The Linux Foundation Announces Intent to Form New Foundation to Support GraphQL" . The Linux Foundation . 6 November 2018 . Retrieved 17 March 2023 . Wikipedia revision 1372636557, retrieved 2026-11-18 · 1794956400.0
  13. ^ "GraphQL SDL included in Github repository" . GitHub . Wikipedia revision 1372636557, retrieved 2026-11-18 · 1794956400.0
  14. ^ "GraphQL Landscape" . landscape.graphql.org . 5 July 2025. Wikipedia revision 1372636557, retrieved 2026-11-18 · 1794956400.0
  15. ^ graphql-kit/graphql-apis , graphql-kit, 31 May 2025 , retrieved 5 June 2025 Wikipedia revision 1372636557, retrieved 2026-11-18 · 1794956400.0
  16. ^ "GraphQL Conference 2025" . GraphQL Foundation . Retrieved 29 September 2025 . Wikipedia revision 1372636557, retrieved 2026-11-18 · 1794956400.0
  17. ^ a b "GraphQL" . spec.graphql.org . Retrieved 25 April 2023 . Wikipedia revision 1372636557, retrieved 2026-11-18 · 1794956400.0
  18. ^ a b "Schema Design | GraphQL" . graphql.org . Retrieved 3 June 2025 . Wikipedia revision 1372636557, retrieved 2026-11-18 · 1794956400.0
  19. ^ "GraphQL September 2025 Release Notes" . GitHub . Wikipedia revision 1372636557, retrieved 2026-11-18 · 1794956400.0
source: e01 Encyclopedia · licence: CC BY-SA 4.0 · page · source revision

Cite this

"GraphQL". 1788269963. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1372636557

JSON record · API collection · citation policy