GraphQL in the wild

Video in TIB AV-Portal: GraphQL in the wild

Formal Metadata

GraphQL in the wild
Title of Series
Part Number
Number of Parts
CC Attribution - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this license.
Release Date

Content Metadata

Subject Area
Since being released by Facebook in 2015, GraphQL has gained a lot of hype for being the best thing since sliced bread and REST APIs. But what is all the hype about and how does GraphQL fare in the real world? As a Django developer who has been using GraphQL in production since September 2017, I will discuss how we have addressed real-world concerns like performance and security. I will also highlight some of the joys of using GraphQL and why we have stopped writing REST APIs for new features. If you have never heard of GraphQL or have never used the Graphene library, have no fear. There will be an overview of what GraphQL is, as well as a demo on how to incorporate it into a Django project using Graphene.
Graph (mathematics) Multiplication sign Projective plane Product (business)
Server (computing) Serial port Code View (database) Multiplication sign Water vapor Client (computing) Product (business) Mathematics Different (Kate Ryan album) Descriptive statistics Computing platform Task (computing) Pattern recognition Graph (mathematics) Theory of relativity Feedback Projective plane Electronic mailing list Field (computer science) Total S.A. Bit Lattice (order) Flow separation Peer-to-peer Data mining Data management Word Right angle
Web page Statistics Graph (mathematics) Multiplication sign Bit Representational state transfer Disk read-and-write head Number Data management Word Self-organization Ranking Object (grammar) Endliche Modelltheorie Arithmetic progression Booting Task (computing) Sinc function Resultant
Point (geometry) Pairwise comparison Graphical user interface Graph (mathematics) Structural load System call Information security 2 (number) Product (business)
Mobile app Inheritance (object-oriented programming) Graph (mathematics) Demo (music) Multiplication sign Bit Database Field (computer science) Machine vision Variable (mathematics) Power (physics) Inclusion map Type theory Query language Repository (publishing) Personal digital assistant Logic Repository (publishing) File viewer Gravitation Software framework File viewer Endliche Modelltheorie
Source code Mobile app Graph (mathematics) Open source Graph (mathematics) Building Multiplication sign Video tracking Disintegration Source code Debugger Client (computing) Approximation Product (business) Revision control Facebook Googol Software framework Website Library (computing)
Meta element Installation art Graph (mathematics) Parameter (computer programming) Variable (mathematics) Automatic differentiation 2 (number) Data model Uniform resource locator Query language Query language Vertex (graph theory) Task (computing)
Meta element Graph (mathematics) Arm Gender Bit Electronic mailing list Field (computer science) Data model Type theory Root Query language Object (grammar) Blog Query language Triangle Vertex (graph theory) Endliche Modelltheorie Object (grammar) Task (computing) Library (computing) Task (computing)
Filter <Stochastik> Meta element Digital filter Projective plane File format Sound effect Counting Bit Field (computer science) Data model Type theory String (computer science) Query language Right angle Vertex (graph theory) Arithmetic progression Resolvent formalism Library (computing) Task (computing)
Scripting language Filter <Stochastik> Meta element Interface (computing) Electronic mailing list Counting Cursor (computers) Cursor (computers) Field (computer science) Connected space Data model Facebook Mathematics Object (grammar) Interface (computing) Query language Arrow of time
Area Context awareness Meta element Raw image format Graph (mathematics) Bit Average Field (computer science) Product (business) Variable (mathematics) Data model Type theory Query language Query language Interface (computing) Social class Endliche Modelltheorie Implementation Glass float Task (computing) Descriptive statistics Data type
Complex (psychology) Subject indexing Statistics Process (computing) Graph (mathematics) View (database) Personal digital assistant Feedback Endliche Modelltheorie Statistics
Dependent and independent variables Graph (mathematics) Archaeological field survey Chaos (cosmogony) Database Front and back ends Type theory String (computer science) Authorization output Damping Object (grammar) Error message Form (programming) Thomas Bayes Computer worm
Digital filter Mathematics Message passing Graph (mathematics) Query language Connectivity (graph theory) Query language Variable (mathematics) Task (computing) Resultant Variable (mathematics)
Context awareness Dataflow Graph (mathematics) Gender Field (computer science) Disk read-and-write head Mereology Field (computer science) Frame problem Type theory Term (mathematics) Personal digital assistant Atomic number output Information Endliche Modelltheorie Object (grammar) Task (computing) Social class
Raw image format Software developer Client (computing) Mereology Variable (mathematics) Logic Query language Logic output Right angle output Task (computing) Electric current
Source code Default (computer science) Execution unit Graph (mathematics) Cellular automaton Software developer Source code Code Counting Total S.A. Punched card Type theory Mathematics Latent heat Logic Query language Order (biology) Resolvent formalism Library (computing)
Authentication Graph (mathematics) Query language Cellular automaton Authorization
Classical physics Server (computing) Identifiability Multiplication sign Authentication Maxima and minima Set (mathematics) Limit (category theory) Field (computer science) Front and back ends Product (business) Computer configuration Query language Repository (publishing) Authorization Message passing Fiber (mathematics) Social class Area Authentication Raw image format Service (economics) Graph (mathematics) Infinity Denial-of-service attack Density of states Limit (category theory) System call Connected space Loop (music) Error message Query language Logic Authorization Resolvent formalism Extension (kinesiology)
Service (economics) Graph (mathematics) View (database) Multiplication sign Forcing (mathematics) Calculation Maxima and minima Database Maxima and minima Limit (category theory) Bit rate Density of states Limit (category theory) Connected space Number Error message Bit rate Query language Query language Repository (publishing) Vertex (graph theory) Message passing
Slide rule Default (computer science) System call Query language Multiplication sign Cellular automaton Counting System call Booting Number
Facebook Stapeldatei Multiplication sign Query language Square number Database Booting System call Field (computer science) Booting
Parsing Graph (mathematics) Dependent and independent variables Graph (mathematics) Code Counting Client (computing) Parsing Instance (computer science) Counting Number 2 (number) Wiki Whiteboard Query language Object (grammar) Query language Set (mathematics)
Sensitivity analysis Serial port Multiplication sign File format Set (mathematics) Theory Field (computer science) Web 2.0 Bit rate Blog Term (mathematics) Ontology Logic Videoconferencing Authorization Energy level Software framework Endliche Modelltheorie Implementation Raw image format Service (economics) Graph (mathematics) Information File format Software developer Client (computing) Denial-of-service attack Bit Database Data model Spring (hydrology) Angle Query language Personal digital assistant Right angle Authorization Table (information) Library (computing)
Raw image format Mapping 1 (number) Electronic mailing list Electronic mailing list Mereology Variable (mathematics) Type theory Logic Different (Kate Ryan album) Object (grammar) Ring (mathematics) Query language Circle Endliche Modelltheorie output Implementation
Filter <Stochastik> Web page Point (geometry) Meta element Digital filter Functional (mathematics) Real number View (database) Multiplication sign Set (mathematics) Numbering scheme Client (computing) Distance Mereology Field (computer science) Subset Product (business) Revision control Data model Mathematics Term (mathematics) Authorization Series (mathematics) Endliche Modelltheorie Extension (kinesiology) Task (computing) Form (programming) Default (computer science) Pattern recognition Graph (mathematics) Information Key (cryptography) Interior (topology) Electronic mailing list Code Cartesian coordinate system Connected space Query language Personal digital assistant Right angle Quicksort Glass float Resultant Resolvent formalism Library (computing)
and to do this in the
in the middle of the Marines in having to my talk and others a pretty also taught happening at the same time so I really appreciate it and 1st offer a show of hands of who here has used explorer graph QL API before OK and who here has tried implements a graph fuel and schema in the back and on a side project couple people of engineer has used in in production 1 a so your question can be directed at or not and so on and so thank you my talk today is called graph you well in the wild some
people here likely cited that in I have
so now I know a bit about your experience and in talk a little bit about mine I have firing with the M a generalist have more than 1 step the passing read but in my bio but related to this topic of item myself dingo about 2 years ago I was on the only employee at the start and then I realized they needed some mentorship I'm and I work at 7 gives they're using Django and I've been there for 1 and a half years and so we're based in Vancouver Canada or about 30 employees total of but back then there were like 4 back and engineers and 2 of them were doing several things so they're kind just 2 of us so and then like forefront and engineers and we and so my coworker Tony whose amazing and is very curious about these things and I was into interesting trying and graph well kind of you know early on and and so we have been using graph you all in production for about a year and in the talk description of there's 20 17 and I think all the sixers got change into 7 happened for 1 2 and so yeah it's been about a year up there have been a lot of talks is a lot of resources online about graph to well in general not as much about using it in Python on but I wanted to focus this talk less so on like an intro to graph well and more about what we've done to move it from like cool pet projects to using in production and how it helps us on but there will be an overview of that but I'm gonna kind of breeze through it a little bit so that there's room for questions at the end and then if you have questions about it we can kind of go back so present all the talk about rest rest is pretty awesome you can you know you got that separation of client and server code of meeting not at at the server and still have like mobile of youth and up and just different views of the same stuff and yet great right we all adopt the and I actually haven't been I only have like a few months of your experience so I know more about graph you all of but there are some issues with the rest are 1 thing was that we were notice water performance issues 1 thing is when you're trying to get related data on so you've got you know you normal list you that's cool the way you want like a dashboard view of and C wanna show lot of related data and you know you have to go into this mess astructure each 1 of those endpoints is like a difference of request of so that takes a long time is you need a lot of requests another thing is the amount of time of seeking for serialization that ended up being the vast majority of the performance issues seeing per request of for example are user resource you know so what seventies does we have a performance management platform on so you can set goal you can have meetings with your manager then give peer feedback and give peer recognitions in a lot of all that is user focus right so we're sending the the user with everything are user extended user resource has 34 peeled in it only 4 of them membrane so were wasting about 80 per cent of the data that were getting back to the server so breast was still working for us performances user-side but then the designer is came up with this task words that to build looks like this
of you know you can see my objective my objectives for Michael's of but that have that are related to those goals the overall progress since stats my latest and updated the goals but and this is also on the page and all the gold related to my co-workers and my manager and then just for fun some summaries about the organization and the team that ion so at an
example of a bunch of data that we need to get that the word shaking in their boots like this for the rest the brain of the and so we have had a little bit of a challenge my coworker Tony had is that the boring but this might be a good time to check it tried out of the and I had a little bit of friendly competition going on I would try to use our REST API endpoints I don't have to worry about versioning acted like reduce the number of that day I was sending per resource and he wears relic the graph you up on the winner of this challenge but if I want I would get to name name is about to be born baby boy on the end of it is the so my model I'm Filipino my mom is probably did we have weird names she knows someone whose child was named spaghetti it's so I was just going to take that so that I the phoneme son of you name of spaghetti 88 angrily so up and if you want he I would not get an insight In the head so long as do this in and hour results were with the rest this is what it looked like
I'm in the Chrome Inspector but in our calls there are a lot of them a graph to well a lot like this so comparison of 10 . 3 seconds overall and by point 5 a lot of that is just loadings
so what is this crazy voodoo magic later on and how do how do we actually use this production we wanted to know they were are you know the security guys like what about this 1 but this 1 of this like I think we can solve them so and as many of you
know did have is 1 of the major players to move to a graph UL API and we all love interest you have great and so they could do it we could do it on the actually it at about the same time enough understood show you quickly the a little bit about what that looks like so here is the graphical apps it is awesome it's like swagger but we better I'm aging arrest frameworks are so 0 1 and new query and and so I am the viewer so let's see I want some repositories I only wanna get the 1st 10 and this is weird stuff that go over briefly later and the and let's see although those are some issues School of now I don't want arenaviruses assist demo by and see where that comes up so tha so I can see my name I've got a few repositories in here and but pretty much gravity well you can it's a query language it defines how you query data from your API eyes on it's similar to SQL which is a query language for your databases on but this is above the layer of databases this is API visions of a logic you can have totally different models in the back and from what you display in the front end of and that's actually highly encouraged so our going to get out of this and the ability to that define precisely the data you want and only the data you want is a powerful advantage of rest API and some of these advantages include yet the it out by you wanted nothing more of nested fields and strong typing so it doesn't play well with
Tango are the answer is kind of this
is passed on since this is a really powerful for front end and devastating specially reacts also Facebook out approximation on Facebook with where the people who actually created graph you well on they've been using it internally eyes in production since 2012 they had this issue with getting too much data especially for the mobile app that doesn't need as much data as their web site and they open source that they announced in January 2015 it's about 2 years ago open source that about half a year later on and now you know it's has grown and evolved over time on but because it's more for the front and I think the GammaScript communities have really taken to it is led 5 different version of it in knowledge I'm adding agenda we've got wrapping which is pretty cool I pretty easy but there are some drawbacks the so here is
the did have really need for it so you can just use the pipeline it has hooks to work with Django especially the or em up you can also use this to all to me and maybe EPG sometime in the future that's been there for like a year and so
how do we set it up it's like 2 seconds it and so graphene Django added to install apps and on set the URL that you want all of graph you well to go to you so graph you well it has a single endpoint and he send the data that you want in the query and your variables you either through on the debt of query parameters or through the post body and so that can be anywhere I'm calling graph you up it also had a comes built-in with that graphical ads which you can explore everything with so our so that's it mostly and then you have to define your
queries in years and schema
up it's as simple as this if you're using Django you just say hey I've got everything in red by the way I'm sorry for anyone who's got 1 of we can see it but like Django object that is in red on I wanted to do do that so you can see what exactly is coming from the graph the library of or the Django graphene library so it wasn't so long so say it's a Django object type you're creating a node on and it's going to be based stuff of this model the task model in Django of you also have to define so this I do not have to define how you're going to enter the schema so your queries so here I'm just it's goals on because this is low the kind of data that I'm working with my company on and then you can resolve Goals in a certain way by saying here's so our query set to look at and then add it to your schema so
here is a little bit of a drawing that a overlaid with things I got from the Apollo blog thinks Apollo and so you've got the triangles is where you're entering the schema and then you can use graph well to traverse the rest of it and the yellow bits are the nodes and then all the little things coming off of that are like fields of that node so on graphene will take that automatically from your arm gender models can
exclude things of course and we can also define custom nodes so for the user notify 1 full name I can say is full name is this type strain and and string is from the grapheme library and resolve it and so whenever you have read all anything that's like a field you can have a resolver for of and I'm design talk about resolvers later effect they can say what a reference right so that's pretty easy so i'm just gonna show you a bit about all that stuff I've done
just now with that looks like that will get us this goals I'm about some tasks and they each have a name check and and yeah so that's it for now so that I could see that and so you can use this on top of any project that using regardless of whether you have a CPI enough and so next adding filters and pagination and this makes it a little more complicated so you've got golden name progress up but how do we get certain things like what the total count is and I had we do pagination filter on them so
so the red arrows are now going to be called connection forgone at a few different things of and so
when you're when you have like a many 2 1 or many to many relationship of it's going to now be called edges so that you can do things like that the total counts of the edges of the wars that these things called cursor for pagination and understand and then you can also use of you can filter you see on auto that anyways it also has it also adds filtering so how you get back is something called relay Facebook and it really has it is kind of like redox for JavaScript's but let's not worry about that you didn't you don't have to use the relay and a script on to you the relay pagination features in that being and so all you do is say I'm using this relay node interface and that changes all your connections to our changes your list the connections and and then you can use something called Jango filter connection field and that has the ability to define your Django filters so you wanna use and so you can use your data others on every node yeah lastly or when almost
we have kind of built in documentation which is 1 of my favorite features I've graph lot on so I can just say here
is the description of this field of and then what that ends up looking like is in the the docks I can go into query I can look at Cornell again look at 0 no sorry that is a mistake the where did I added to areas of yeah so by going to progress I can see the description in here but you can also you almost never any description because they should be describing themselves ideally the that and then there is a lot of other fancy stuff that he gets on which were not and talk about but if you have questions you can ask me inside of the and pretty much the answer is they can do everything pretty much everything that he wanted to do on you might need a little bit of tweaking but so we've added our own field can return different on Django model types on on the same node using unions of everything like that so you got some pretty cool stuff there's some pros heard Ibaraki well it's a itself explorable like you don't have this anything else up and it's pretty fun you got easy documentation and I find it personally more intuitive to implement been dangerous framework of and that's just on the back side you like you know in building API is there's a whole lot of benefits for the front so what makes where some
use cases and make it better than rest so as we saw before those complex and use the want on summary is dashboard stats on big your nodes don't have to be connected at all to jangle models you can return when everyone on the we have a stats node and that there's a lot of processing in the back and centers of France and we were dead this
way of value that was found September to November we were only using graph you for complex use index but then we have this other challenge we were building the feedback
form and we wanted to create a survey builder that would save I and the the front people had tried implementing it already in rest there is like all the stuff we were using like we are reactive like ax chaos of to to do certain things you know determining all when you're creating a new objects so opposed evident when you're updating an object of visit when you deleting things have to be done in the right order and if you did something fails you have to remember what else needs a comeback of come after it on so we had this idea to use graph QL for it of and it ends
up working really well so instead of doing each I don't we dislike centered a big killer and the back and it's up to the back end to figure out how to save everything so that within the database actually looks like the payload bay you lots of you got a successful response you know that what you're showing is actually with on the back from and no you can do this without graph well but the benefits of doing it with graph you well are the type checking you don't have to check each input that yes this is a float yes this is a string is in England the do all that for you and then give you an error authority so
there are these things called mutations on instead of queries so those are the 2 main components of graph you well and how
you set that up but this is what it looks like
in the end you got a mutation here you can pass in some variables on passes variables into the mutation and then when you press but when you send it on way how is in here is another query and not the data that you get back and that's the result of doing those of that mutation so you know have you if you've ever had this problem where you change some data or something else than changes and the needed do another request to see how it affected on that's all in 1 request now and you just yet define when you want a return and
so have you can define some inputs and they're like no inspired there's actually no quick way that I know of getting the input types from the gender model you have to build this yourself and in that way it's different from a push or a patch because you're not you not was to think about it in terms of I have this object i wanna change the field is the skill this it's more like I wanted you take this object in some way I wanna do something to it and the back should have a better understanding about what that means and you itself looks that not for like that
it have a head on the yeah you can define a magician likes so of you have a graph to all mutations class are you define what inputs you taking and I'm actually only taking an into the flow in this case I'm and not the input side showed on the previous frame but I wanted to show you how it can be done of and and then their goal part is defining what node is being returned by its so that's where you can query on when you're actually doing annotation for your return data and then you go bunch of stuff make sure it's a common name and then he does said I add it as a mutation on here schema on the end
and so looking back at our graphical 8 and you were you know you can see that where that have been present in the inputs the return data the variables and
so this simplifies the client-side logic but they have to do you don't have to along with the gets and the rights the front and loves it if you want to make your developers have been up think about using it but was the catch and and so this is the more important part of the talk of so 1 thing
is I graphene is the only library that you know is really viable to use implement a graph you well schema and Django and I thought it was released about a year ago and agencies since then there hasn't been that much activity on it so there it is a young library and there hasn't been a kind of contributions and so there are but is there are yeah
those releasing 20 16 but the docks are not super complete if you have questions about the new after I ask a question as an issue in the Indian of also sometimes it alive now and the graph specs so for example total count is in the graph fuel specifications on but as far as I know is still not yet in the graphene library so we had to build better cells and there are some bonds are with the resolver is if it kind of the has some weird logic so we've had to re write a lot of that logic about how things get result his you know 1st we want to know return the resolver query set then we want a filter on that and then what you can do other stuff in the order that it does it by default is not right of and lastly the all 1 of the big things is that the source code is quite complicated a lot metaprogramming in it and as someone who is only an intermediate type developer of it's kind of hard said diving and make the changes I you wanna make of so I would say that kind of the biggest hurdle to using it on
the other hand it so yeah the real world is messy and you're not gonna want his graphene exactly in the way that it was made and this is not actually studying if the baby found in giving us is that
they other real world is messy up and graph well is just a query language it's not telling you how you should do certain things like authentication and authorization and of and caching and stuff like that cell we had to dress itself so 1st what
about permissions on you know for ice permissions were really big issue because we have different companies using a product people from 1 company should not be able to see if any of the data from another company well so 1 option that is kind of what the graphene doxies should you if perform authorization on each resolver and that would be a pain in the butt of you what have the caller ID or authorization class every time you wanna get a connection on the other option is to extend grapheme to perform that authorization on every connection which is what we did and what I encourage you to do on it's not like the area it doesn't have all these books to like you know your custom logic here you know you have to you have to actually extend the classes of well we did have any of you have tried to do it so we 1st of all added to each node at what class that we're were using for authorization is on and then we extended Django filter connections field on the connection resolver we added the user authentication and so are they loved in any actually see any data on and then when he resolves a connection we say from your note we know years was others authorization classical fibers operating limits on the original query set and that's what you should use so the the rest of us so that's pretty again that's a solvable issue if not it like even know it kind it takes some effort but when someone is requesting too much you know we've got on denial of service doesn't necessarily have to be an attack it could just be someone's requesting human and it's our hogging up I'm on your server and so what we did because you know you can traverse as much as you want on graph you well has some things like you can't use cyclical things you can have an infinite loop which is going on but you can just like have someone like a script create like a really big money stuff so what we want when that 1st which is the easiest way of doing it is having a white list for the allowed query so we actually had all the queries in the back end in Python and on gave each of them by an identifier and then the front and would have to call bag of graph you will query by its name and so that we were allowed to say these are only the query that anyone can run on that that
you know works no it works up
to a point on and that only added inside so we're trying to move away from that so another thing
you can do all which get half of 1st I is add a maximum limit to any connection so there's a force was 30 now it's a hundred and so every time you wanna get a list of stop up to define how much you want on bail also have implemented and maximum query cost which is something that we have only just done last month finally I'm so you can save you know you can max access 5 thousand nodes on any given query and this is how I did have calculates there's we do a little differently but you know having it there is awesome and enforces the limits as well because we decide you don't have a limit then were assuming you're getting a thousand I'm and that something graph to all also has is rate limiting based on query cost so before their view 3 API had a certain rate limit now you can that everyone that doesn't make as much sense as you can grab so much more data on so it has a different way of calculating the cost that based on the number of database connections that you're actually getting and so the rate limit you based on that the
and so lastly what about performance and for some people this is the big elephants on everyone uses this I added to my slide this is how the so sometimes queries
take a lot of time and go of graphene doesn't really at 1st especially at the beginning been really do much to focus on performance and mostly focus on getting it to work on since the 1 has came out of that was like a big performance improvement but there's still more that can be done for example of by default it doesn't do select related prefetch related so 1 it resolves the query as it traverses it which is not necessarily that it's not the most performance of something we also did is reduce the number of account calls on other so it's something you can do instead is have something bad looks at lower and higher query and and and add things to it and and resolve it all at once cell that brings us to the data loader
this is Facebook's to the performance issues on so initially like without the data loader this could take 13 on database calls for all these different fields the wider database queries on but with the data loader does is it analyzes everything which returns a promise and then I'll it batches grabbing things so if you have a bunch of users here in the friends that have the same pk k then you don't have to get the multiple times you just get them in 1 big batch that and so
having a mac square cost also helps with the performance you on and for us 1 of the
biggest thing is just a friend in education about how you use graph well since this was a back initiative you know they were like a will use the that's cool and they really liked it but it in this really know much about it we see it more as the back and think that a friend and things and so they're like will get all the data especially before we had the query cost as if they were doing things like that where the things I have all these tools give me the idea of all of them and then in the front and I'm just going to count the entire length and that in it then that's all I need and there were like actually don't get any of that and get the count this on you're only gonna show to like the the the from name or if there's more than to 1 person and then just the number of people than just grab the preferred and that
yes and I said this is you know 30 seconds and here this is 1 of the longer issues in get have I'm about graphene and you know you can call it it keeps changing and interesting you've added a whole bunch of stuff on but there's still more work to be done so
there are some considerations and it's still by young library I'm hoping but Cyrus isn't here today is the now that carried them into the lake of such as hoping to like maybe we did spring gonna tomorrow but I actually don't ontologies into that so that I could use some work i've because especially because graph well on it just a query language and it doesn't specify had to giving so How would graphene no what to do about these things yes and authorization denial of service and performance are some of the big thing that you have to look at if you are using it so show you use set who is maybe considering using it now after the stock that's cool but so go great if if this is by product and provide it is really fun and no and the like have as a tool that you know mean so also addresses causing some performance if used on that you're like actually don't know how to get around this so I can replace all my theory elided serializes with something faster but you know that a lot of work and also if you're rest format is making it difficult to read or write things and the importantly those those you have the resources and like development experience to know how to extend in the way that he wants on and you know hold out just like back up a little bit of I mean you should still try to do it by think about it if you have a lot of sensitive information and of or you're trying to create a public API in which case you have to worry about rate limiting inquiry cost on and you don't have enough development resources to do so or not of experience experience to know how to extend I was so that's pretty much it I you there's a lot of greater resources on the web this 0 graph well of video is you know probably the 1 that's posted everywhere but it show and yeah and so thank you very much at the end I think you what to database engines to recommend the authors sporting this of any time I'm right here we use the my sequel of and the Italian but it isn't and a bag of now because you can it a really is a matter I don't think I'm a beaver performance it could be a lot better and for 1 or the other but I constant personal thank you know every
morning to learn more about the strong terms of screwed up somebody's experience explained it to us and they departed that I don't quite understand is how do I have to do something special when I create my data models like if I I I like to make lots of little like union tables for permissions and stuff like that of S that does out work with this kind just use what Iady habit away have to redesign the way that I handle I store my data to use this stuff I I I don't exactly know what you mean by union model that but we use all of our saying authorization from generous framework there you can just kind of like add things to the node are uh so we added an authorization model to the nodes and you have other things that you want and then at a higher level the that angle connected field which some of that shit thank you so
so the yellow circles are nodes and so in this example it's like list User interview different nodes vaporize there they relate to arm models the Iast those so it's just like you know the Islamic sense I saw the parts of the graph so that you can traverse bats are not scalar types so the ground so they're the 1 that you create yourself and the ones that you on yeah defined based on your models or the way that your business logic is as like at a real it like a resource all right so if I if if I'm assuming that that maps to but like a normal Django
model that I have to laugh I have a a foreign key yet does distance is just Grant grapheme to the common good right we are sold to the form q have numerically support point it does do it automatically so but you can also you also 10 add as much or as little as you want to it so for example this goal node and if I don't have that's and it'll still have tasks er why actually my models are at my models are actually different but I'm showing up some something not based on the OK are goal methodology that we use so why remove these fields are and it'll have a key results of which is like tasks already on it but it's just been default settings of I do this is to say actually change that field of from the original name Q results to the main tasks and then I can add different things in here so I can add a description and for the docks I can I 4 different fields you can add the defaults and whatever and then if you want to limit the subset of tasks that actually receives his right now is getting all of them actually do this by needed to change them and bring out in all of them you can also use the resolver to change the functionality of what the default is and send you know as filter list of task down of tha like that and so this is a query set that it's gonna return from the resolver and then the i'm authorization is going beyond that and any filters that you added are going to be on that but for something to the talk is really great we're talking while you at the low end of i was curious when creating referral and points in practice in real production application to find yourself making basically 1 giant graph she will like and point you can get everything or like tailor to more specific pages are use cases like I divide that up I so we do have 1 big schema that you can have axis from you know all these different nodes on but that's based on our happy if you want to have different points you can easily do that in the world and just have different versions of the schema it replaces I actually yep I think there's some sort of setting to say which of you uses which schema on anything right now that's in this setting is that I actually don't remember I think it might as look it unlikely but you can set out to different schemas on if that works for you do a recommendation on what click in your experience unless you're so like what his work better use it uses to keep everything in 1 place that it can you know when you're to need something found from a different part of the act of like ah they're all kind of interrelated anyways on so it makes sense to have all that information available like user for a user I need to know everything that they've done many recognition that they receive timely goal so they created in check so that makes sense for us to look some steps the and I saw the interactive like query builder of you can certainly agree that will yeah this that mean that the uh series exposing some sort of schema to the client uh I mean it is something that I would like to do in in in the client side it is I have a scheme that I can use either to validate data as it comes in or to our generate forms that are having to actually create the form terms with like even if the graph kilos exposing the schema I was wondering if use in JavaScript that so it has introspection and I can tell you with this scheme that is and people have used it and In typescript but I don't know if it worked very well by it is possible to say they get without schemas of the another thing I didn't mention is when we use the white listing query math then we actually didn't expose that view on to the outside world you can only use it in the valley just you know so that people can runs of 1 them yep so all those extensions you've made but for the authorization your extensions to the delta connection field for those things that we can expect to see in upstream graphene at some point I perhaps I'm really hoping so I think now that I've given this top is more incentive for us to get things were in United flight you it in our own you library and yeah and besides that like I think well we should do is add pull requests to it and regardless of whether you a around he you can see what we've done in just copied and arts yeah that that's the time so that's think and day at if that things so


  392 ms - page object


AV-Portal 3.20.1 (bea96f1033d39fbe77f82542458e108105398441)