Detecting Cycles in GraphQL Schemas

GraphQL is a database handling API created by Facebook, that provides an effective al-ternative to REST-style architectures. GraphQL provides the ability for a client to spec-ify exactly what data it wishes to receive. A problem with GraphQL is that the freedomof creating customized requests allows...

Full description

Bibliographic Details
Main Authors: Soames, Kieron, Lind, Jonas
Format: Others
Language:English
Published: Linköpings universitet, Institutionen för datavetenskap 2019
Subjects:
SCC
Online Access:http://urn.kb.se/resolve?urn=urn:nbn:se:liu:diva-156174
id ndltd-UPSALLA1-oai-DiVA.org-liu-156174
record_format oai_dc
spelling ndltd-UPSALLA1-oai-DiVA.org-liu-1561742019-04-19T05:16:15ZDetecting Cycles in GraphQL SchemasengSoames, KieronLind, JonasLinköpings universitet, Institutionen för datavetenskapLinköpings universitet, Institutionen för datavetenskap2019GraphQLSimple CyclesCyclesAlgorithmAlgorithmsJohnsonTarjanWeinblattTiernanJavaScriptGraphVertexVerticesPathStrongly Connected ComponentsSCCCyclicityDatabaseComputer SystemsDatorsystemGraphQL is a database handling API created by Facebook, that provides an effective al-ternative to REST-style architectures. GraphQL provides the ability for a client to spec-ify exactly what data it wishes to receive. A problem with GraphQL is that the freedomof creating customized requests allows data to be included several times in the response,growing the response’s size exponentially. The thesis contributes to the field of GraphQLanalysis by studying the prevalence of simple cycles in GraphQL schemas. We have im-plemented a locally-run tool and webtool using Tarjan’s and Johnson’s algorithms, thatparses the schemas, creates a directed graph and enumerates all simple cycles in the graph.A collection of schemas was analysed with the tool to collect empirical data. It was foundthat 39.73 % of the total 2094 schemas contained at least one simple cycle, with the averagenumber of cycles per schema being 4. The runtime was found to be on average 11 mil-liseconds, most of which consisted of the time for parsing the schemas. It was found that44 out of the considered schemas could not be enumerated due to containing a staggeringamount of simple cycles. It can be concluded that it is possible to test schemas for cyclicityand enumerate all simple cycles in a given schema efficiently. Student thesisinfo:eu-repo/semantics/bachelorThesistexthttp://urn.kb.se/resolve?urn=urn:nbn:se:liu:diva-156174application/pdfinfo:eu-repo/semantics/openAccess
collection NDLTD
language English
format Others
sources NDLTD
topic GraphQL
Simple Cycles
Cycles
Algorithm
Algorithms
Johnson
Tarjan
Weinblatt
Tiernan
JavaScript
Graph
Vertex
Vertices
Path
Strongly Connected Components
SCC
Cyclicity
Database
Computer Systems
Datorsystem
spellingShingle GraphQL
Simple Cycles
Cycles
Algorithm
Algorithms
Johnson
Tarjan
Weinblatt
Tiernan
JavaScript
Graph
Vertex
Vertices
Path
Strongly Connected Components
SCC
Cyclicity
Database
Computer Systems
Datorsystem
Soames, Kieron
Lind, Jonas
Detecting Cycles in GraphQL Schemas
description GraphQL is a database handling API created by Facebook, that provides an effective al-ternative to REST-style architectures. GraphQL provides the ability for a client to spec-ify exactly what data it wishes to receive. A problem with GraphQL is that the freedomof creating customized requests allows data to be included several times in the response,growing the response’s size exponentially. The thesis contributes to the field of GraphQLanalysis by studying the prevalence of simple cycles in GraphQL schemas. We have im-plemented a locally-run tool and webtool using Tarjan’s and Johnson’s algorithms, thatparses the schemas, creates a directed graph and enumerates all simple cycles in the graph.A collection of schemas was analysed with the tool to collect empirical data. It was foundthat 39.73 % of the total 2094 schemas contained at least one simple cycle, with the averagenumber of cycles per schema being 4. The runtime was found to be on average 11 mil-liseconds, most of which consisted of the time for parsing the schemas. It was found that44 out of the considered schemas could not be enumerated due to containing a staggeringamount of simple cycles. It can be concluded that it is possible to test schemas for cyclicityand enumerate all simple cycles in a given schema efficiently.
author Soames, Kieron
Lind, Jonas
author_facet Soames, Kieron
Lind, Jonas
author_sort Soames, Kieron
title Detecting Cycles in GraphQL Schemas
title_short Detecting Cycles in GraphQL Schemas
title_full Detecting Cycles in GraphQL Schemas
title_fullStr Detecting Cycles in GraphQL Schemas
title_full_unstemmed Detecting Cycles in GraphQL Schemas
title_sort detecting cycles in graphql schemas
publisher Linköpings universitet, Institutionen för datavetenskap
publishDate 2019
url http://urn.kb.se/resolve?urn=urn:nbn:se:liu:diva-156174
work_keys_str_mv AT soameskieron detectingcyclesingraphqlschemas
AT lindjonas detectingcyclesingraphqlschemas
_version_ 1719019842811461632