https://prefect.io logo
Title
d

Divya

07/26/2022, 1:41 PM
Hello, I have a question regarding Prefect2.0. My team was using Prefect1.0 earlier and had been using the Graph QL functionality. Do we have this functionality in Prefect 2.0 as well?
1
s

Stéphan Taljaard

07/26/2022, 1:44 PM
Hi. The GraphQL API has been swapped out for a REST API
:party-parrot: 1
:thank-you: 1
d

Divya

07/26/2022, 2:31 PM
Thank you for getting back @Stéphan Taljaard! If possible can you please provide the documentation for the same?
t

Taylor Curran

07/26/2022, 2:39 PM
Hi Divya, Check out these docks for an Overview of 2.0 APIs. Check out this if you are just interested in checking out the Prefect 2.0 REST API.
🙌 2
d

Divya

07/26/2022, 3:22 PM
Thank you sharing the documentation. Will go through!
s

Sebastian

07/27/2022, 9:38 AM
Out of curiosity, what was the motivation for abandoning GraphQL in favour of REST?
t

Taylor Curran

07/27/2022, 1:16 PM
Hi @Sebastian 🙂
Our CTO Chris White did a great job of answering this question live the other day.

Here's a link to the timestamp

of that recording.
In summary
• Lots of people were unfamiliar with GraphQL and asking for RestAPI
• For Prefect Server specifically, because we chose to use GraphQL, that’s the reason why Prefect Server is so heavy - we needed the query schema off of the database (which is what Hasura does)
• For our business logic, we had all of our mutations defined in Python code
• Those are two separate GraphQL schemas so we had to stitch them together
• All of this resulted in a very large, heavy container that was Prefect Server
• REST is very lightweight and allows us to automatically pull in Prefect flows into the UI even if they ran before the UI was launched
• Finally, GraphQL is very hard to manage when exposing publicly to a high volume of usage
🙏 2
s

Sebastian

07/27/2022, 1:26 PM
Thank you @Taylor Curran for the great insights 🙂
:gratitude-thank-you: 1
:hattip: 1