hh.sePublications
Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
En implementation av GraphQL i .NET Framework med inslag av en jämförelse mot REST API
Halmstad University, School of Business, Engineering and Science.
Halmstad University, School of Business, Engineering and Science.
2020 (Swedish)Independent thesis Basic level (degree of Bachelor), 10 credits / 15 HE creditsStudent thesis
Abstract [sv]

Inom denna rapport så kommer det gås igenom vilka tekniker och metoder som har används för att skapa en implementation en ny sorts webbaserat API. Det nya API't heter GraphQL och upfyller samma syfte som det mer traditionella REST API som används mycket utav företag och organisationer i dagsläget. Det som skiljer GraphQL mot REST är att GraphQL använder sig av "Query Language" för att kommunicera med API't genom att hämta eller skicka information. Implementationen har utförts inom .NET Framework hos företaget Quicksearch.

Utvecklingen har skett inom företagets datasystem och API't kan hämta information från deras databas och skicka det vidare till användaren. Verktygen som har använts för att skapa applikationen är utvecklingsprogrammet Visual Studio tillsammans med programmeringsspråket C\#. Programmet Postman har använts till hjälp för utveckling och testning av API't. Relevanta metoder för att skapa API't inkluderar bibliotek riktat mot GraphQL och sammankoppling mot databasen. Designmönster har varit viktiga i projektet och dessa är "Dependency Injection" och "Model-View-Controller" för att skapa en web applikation.

Slutresultatet är ett GraphQL API som kan forma enkla förfrågningar riktat mot en data-modell eller objekt. Även en jämförelse av GraphQL mot REST API har utförts med resultatet att det finns distinkta skillnader mellan de två konceptenför men för att komma fram till en övergripandeslutsats över vilket API som är ett bättre alternativ så behövs ytterligare tester.

Abstract [en]

This report will walkthrough several techniques and methods that have been used to create a new kind of web-based API. This new kind of API is called GraphQL and fullfils the same purpose as the more traditionally used REST API. What differs between these two types of API is that GraphQL uses a ”Query Language” when the user communicates with the API. The implementation is done in .NET Framework together with a company named Quicksearch.

The development has been done within Quicksearch’s computer system and the API can request information from the company’s database and send it back to the user of the API. The tools that have been used to develop the API are Visual Studio as the development enviroment, along with the programming language C#. Postman is a software that have also been used to help develop and test the GraphQL API. Relevant methods used in the development includes libraries directed to create a GraphQL API and libraries used to create the connection to the database. Design patterns have also be important in the development and the most noticeable ones have been ”Dependency Injection” and ”Model-View-Controller” to create the application.

The end result is an API that is able to recieve simple queries directed against a simple data-model or object. Aditionally a comparison between GraphQL and REST have been done and the result is that there are distinct differences between the two types of API but there is a lack of scientific reasarch and knowledge to make the conclusion of which is the better alternative and additional tests are required.

Place, publisher, year, edition, pages
2020. , p. 26
Keywords [en]
GraphQL, REST API, .NET Framework, C#
National Category
Engineering and Technology
Identifiers
URN: urn:nbn:se:hh:diva-42930OAI: oai:DiVA.org:hh-42930DiVA, id: diva2:1456933
External cooperation
Quicksearch
Subject / course
Computer science and engineering
Educational program
Computer Engineer, 180 credits
Presentation
(Swedish)
Examiners
Available from: 2020-05-20 Created: 2020-08-07 Last updated: 2025-10-01Bibliographically approved

Open Access in DiVA

fulltext(1387 kB)418 downloads
File information
File name FULLTEXT02.pdfFile size 1387 kBChecksum SHA-512
35bbdf681eca76a9c2e24bae5bb191547fffed34707ef8199e244eb83584d5dcc180af2f05524e505cdcc76f151eb220ad3d9ea472bc5c717daf7833e9612419
Type fulltextMimetype application/pdf

By organisation
School of Business, Engineering and Science
Engineering and Technology

Search outside of DiVA

GoogleGoogle Scholar
Total: 419 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

urn-nbn

Altmetric score

urn-nbn
Total: 616 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf