-
-
Notifications
You must be signed in to change notification settings - Fork 534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Roadmap for v1 #268
Comments
Looks good, I think you should add the #175 pagination support to the list :) |
This is great @patrick91! I definitely agree with focusing on stability and ease-of-use for v1. I think writing comprehensive docs is the biggest lift right now. Do we have a plan for what we want to document? I've started to work on some basic docs for queries and mutations, but it would be great to have a list of all of the areas we want to cover. The other thing I'd really like to land for v1 is full subscription support. This is something that I find is really lacking in the Python/GraphQL world right now. It would be great to have out-of-the-box subscriptions for all of the framework integrations we support too. I'm happy to take the lead on this. |
I need a bit of time to think about this, maybe we can open an issue for docs, but I guess what I'd like to see is:
and more probably!
I'd love to have full subscription support, I have some ideas/demo in mind, but not enough time at the moment. |
this looks like a promising start. I would take a look at Pydantic too as you may get some ideas (or direct use) in in the way the base model classes are defined (like how FastAPI use it for REST APIs) Here's a starter Glitch project people can use to play with strawberry -- Python GraphQl server with Strawberry |
@cprinos oh wow, didn't know Glitch supported python 3.7! THAT'S AWESOME! Thanks for the link! Yes, we'll consider Pydantic support! I'll create an issue for that! We also have a discord channel if you want to join: https://discord.gg/ZkRTEJQ |
Pydantic support would be a killer feature. |
Any plan to have support for SQLAlchemy models? |
Maybe, but not for v1, we did some work for pydantic which might be useful for adding support for sqlalchemy too. With sqlalchemy you could map strawberry types to tables though: https://docs.sqlalchemy.org/en/14/orm/mapping_styles.html#declarative-mapping-with-dataclasses-and-attrs that might be a better alternative, what do you think? |
Hm, this looks interesting. It might be what I was looking for-- I'll have to experiment a bit. Thank you for the tip. |
Would love to see some inbuilt support/best practice for Relay (relay.dev) and the node lookup + connections api. Seems like this is boiler plate which would be required for any Relay user. |
@playfulpachyderm Did you make some good experience with the "declarative mapping with dataclasses and attrs" in combination with strawberry? |
Tried my hand at this as well, and came up empty handed. A more feasible approach may be the imperative alternative for dataclasses. However, my main issue is that strawberry types may contain additional information that is not relevant to the sqlalchemy types, so I would require a third intermediary class that contains the shared structure shared between strawberry and sqlalchemy. This also would require me to refactor my models which are currently written using the declarative model pattern. The more promising lead I see here is to not require any particular pattern from the sqlalchemy models themselves and to instead just rely on the mapper inspection to generate the strawbery types, which I will look into if I have the time. Edit: thinking more about this last approach... runtime inspection may be a stretch if a requirement is that the types are available at type checking time 🤔 |
FWIW I would need some kind of sqlalchemy model import for me to really be able to use Strawberry, as I'd really prefer not to re-describe all my data models, so I'm throwing in a vote to prioritize that! In a lot of other ways, this seems to be a far better library than Graphene and I really hope I'll be able to use it soon |
+1 . This is the one factor which makes it really hard to switch from other libraries like Graphene to SQLAlchemy. |
I tinkered a little bit with runtime inspection of SQLAlchemy models to create strawberry.type classes. If you're interested, you can check it out here: https://github.com/HealYouDown/sqlalchemy-strawberry-mapper-proof-of-concept I doubt it will be any useful, but I got kinda carried away doing it. Maybe its useful to you. 🤔 Really looking forward to strawberry and maybe sqlalchemy support in the future. Would be great to use it instead of Graphene. |
@HealYouDown that's pretty cool! Have you seen https://github.com/strawberry-graphql/strawberry-graphql-django? it would be amazing to standardise on an API and implement official support for multiple ORMs. Do you think we could do something like strawberry django for sqlalchemy? Like this:
(we want to use this same approach for Pydantic too) |
I will look into it, can't promise anything though. New to working with GraphQL in general, but would like to try working on the sqlalchemy orm implementation. Will see if I can come up with something. |
Hey guys, I saw that You might have seen that I posted on discord at django channel about this lib I wrote: https://github.com/blb-ventures/strawberry-django-plus. In it I created a generic relay implementation: I made it really generic and no attached to django at all because, not only I would like to have it be useful to non-django related types, but also because my intention was to either contribute it back to you or create a separated project for it (strawberry-relay maybe?). It is also in a single file for that purpose. The way I did it, you just implement the With that, one can create a connection with There's is a And lastly, there's an input mutation field that basically converts all of the arguments passed from the resolver function to an input So, what do you guys think? I can also create a separated issue for the discussion of this topic or discuss it further at discord. |
Let's make a new issue with the proposal so we can keep track of it better 😊 |
It's done: #1573 |
We've made a sqlalchemy -> strawberry mapper based on similar principles to yours 😀 It's working great in production for us |
@TimDumol
thanks for your work |
Hey, just stumbled across this thread as I was curious how getting to v1.0 was going? As a new Strawberry user, it already feels significantly more mature and polished than other projects (such as graphene-django). The documentation for the core project is amazing, so good job! As graphene-django hasn't had an update in a couple of years, it would be great to have the confidence to spend the time porting our graphene projects over to strawberry, and I think hitting v1.0 would be a good indicator 👌 |
Hi @humphrey! thanks for the kind words. I've been meaning to update this roadmap issue (or create a new one). At the moment we are treating the library as if it were a v1.0, expect for some small things we've been trying to deprecate features instead of removing them directly for example 😊 I'll see if I can make some time to update this issue in the month or so, but some of the things that we should do before 1 which are on top of my mind are:
And probably other things that I can't think of at the moment |
Awesome! Thanks for the update :) It sounds like most of those things are internal, and won't majorly affect usage which is sweet! So I'll treat it like a 1.0.
Yes, this was one of the big things I noticed was missing. I did dig through the source code and worked out a few things, and created my own couple of helper functions to help me tweak it to my liking (as I wanted to use Django forms for validations and cleaning up of user data). But the core library is great, and I wouldn't necessarily not launch a v.10 without Django docs. You could always release a 1.1 with full Django support :) |
Hi Patrick @patrick91 , It is really exciting to know that v1.0 is coming. |
Hey @whova! I don't have a timeline just yet! I'll see if I can make some time to make a clear timeline during DjangoCon sprints 😊 In any case we are trying to treat v0.x as v1, trying not to have breaking changes without doing any deprecations first. Maybe I can drop some of the requirements and make the release of v1 earlier. I'll think about that in the next few weeks! |
Thanks for the info, Patrick! Appreciate it. I registered your tutorial at DjangoCon. See you there soon! |
IMO a couple of things to add to the list of things for v1:
Also I don't think the internal refactor is important for v1 and we should just focus on API changes. |
Would be nice to get First Class Pydantic Support for field validations #2181 before v1 Right now, if we advertise with the experimental support. Devs would swarm in and then be dissappointed that its not first class. |
@XChikuX I'd say we do that for v2 😊 It's a big undertaking 😊 |
What is really missing to make a version 1 nowadays? Is the first comment of this issue still up to date? Maybe there is a roadmap elsewhere that I missed. If so, please enlight me. |
I have the same question @patrick91 |
@brunodantas I'll make an effort to make a proper list by end of this weekend 😊 But there's a couple of things top of mind:
|
Hi everyone, I think it is time to start talking about a roadmap for version 1 of strawberry. I've been using the library on a few side projects and most importantly on PyCon Italia's new website. That has helped a lot in fixing bugs and making sure the API is nice and consistent. Also, we have had contributions from many different people (thank you so much!)[1].
In addition to that, we might start using Strawberry at my current job, Pollen, which means me and/or my coworkers will have time to contribute new features and fix bugs. I recently added @mtszsobczak and @msobas to the core team. Now we have 5 people being able to review and merge PRs 🎉#244, which should be enough to keep the project moving forward (the other 3 are @marcoacierno, @jaydenwindle and me).
We never really had guidelines for how this project should evolve, and now that it is becoming a bit more popular, I think it is time to discuss what we want to see in the future. I have my own ideas, but this project has always been meant to be a community project, not my own :)
I'll make another issue for v2, but I want to start a discussion to see if we all are on the same page about v1.
For me, v1 should be a focus on stability and ease of use. That means making the library production-ready and finalising the base API.
I think we are close to that, but we have one crucial thing that is missing, documentation. I've worked on the website a few months ago (PR is here:strawberry-graphql/strawberry.rocks#3), so we have that ready, but we need to start writing docs. I'll ask some friends for some help on how to structure them, the end goal is to make them as user-friendly as possible, helping people also understand GraphQL concepts along the way.
So this is the feature set I was imagining for v1:
For later
Am I missing something? There are some things we are currently working on, but not sure they should be in v1, for example supporting Django models, I think that's a great feature we should have, but I'd get to a stable release first :)
We also have PR for federation, which we might need at Pollen, that's probably going to be merged before v1, but it should not affect what v1 looks like :)
What do you all think?
[1] On that note I've been a bit slow on answering on PRs, PyCon and life are taking a lot of my time right now, but I will have more time soon :)
Upvote & Fund
The text was updated successfully, but these errors were encountered: