Hello, I have a question regarding Prefect2.0. My ...
# prefect-community
d
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
Hi. The GraphQL API has been swapped out for a REST API
🦜 1
🙏 1
d
Thank you for getting back @Stéphan Taljaard! If possible can you please provide the documentation for the same?
t
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
Thank you sharing the documentation. Will go through!
s
Out of curiosity, what was the motivation for abandoning GraphQL in favour of REST?
t
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
Thank you @Taylor Curran for the great insights 🙂
gratitude thank you 1
hattip 1