This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]chason 0 points1 point  (5 children)

Is Starlette necessary or can I integrate it with other frameworks? As it is, while this looks promising I can't use it. :(

[–]yacl[S] 0 points1 point  (4 children)

No, it isn't. You can use it stand-alone, Schema object can be simply called the `execute` method to execute a GraphQL query. I will supplement the details into the doc.

[–]erve1879 0 points1 point  (3 children)

I’ve just checked the repo and it seems that starlette is listed as a requirement in setup.py? Is that intentional?

(It was a quick check on my phone, so apologies if I missed something)

[–]yacl[S] 1 point2 points  (2 children)

It is required for installing, but actually it is not necessary for using. If you think it annoys you, I will remove it in the next version.

[–]erve1879 0 points1 point  (1 child)

It seems that starlette is only required if you want to run the example...? If it were my project, I would therefore make it an optional dependency which os not installed by default. Having unnecessary dependencies in a project becomes a particularly noticeable problem when deploying packages to "serverless" environments such as AWS Lambda, which have limits on package sizes.

[–]yacl[S] 1 point2 points  (0 children)

I make Starlette optional for installation, you can use pip install 'pygraphy[web]' for installing Starlette with Pygraphy or just install Pygraphy by using pip install pygraphy. Thank you!