Hey Diptesh!
It was always my intention to document and expose the autoreloader signals
to third party applications, that way ariadne can configure watches on the
graphql files it knows about. I think this is preferable to having users
having to configure this directly in their projects. We kept the API as
private initially as I wasn’t sure how stable it was going to be, but there
haven’t been any major changes required so I think it’s time to open it up
and mark it as something packages can build upon, if nobody else disagrees?

Regarding a setting - I’m of two minds about this. It’s a good “escape
hatch” for packages that don’t use this signal yet, but it’s also not
particularly… great. Not sure.

Tom

On 8 Feb 2021 at 02:16:45, Diptesh Choudhuri <[email protected]>
wrote:

> I am working on a graphQL project which uses django and ariadne
> <https://ariadnegraphql.org/>. This package supports
> <https://ariadnegraphql.org/docs/modularization#defining-schema-in-graphql-files>
> loading your graphQL schema from external **.graphql *files. While
> developing the schema, I continually change these files and have to restart
> my *runserver *every time I do so, since the changes are not watched by
> default. This obviously gets quickly tiring since designing a GraphQL
> schema takes a lot of iterations.
>
> There is a somewhat hacky fix
> <https://stackoverflow.com/a/43593959/11667450> to this (here's
> <https://github.com/IgnisDa/Gitzer/blob/main/gitzer/director/apps.py#L7>
> an implementation that I used in a project), but the problem with it is
> that it does not work at all for extensions like *django_extension's
> runserver *command. Additionally, it requires you to have to start an
> app, since it is defined in the *AppConfig, *something which might be
> inconvenient to some people.
>
> I propose we add a *AUTORELOADER_ADD_FILES *variable to the *settings.py *file
> which should be a Linux glob (eg: *AUTORELOADER_ADD_FILES = **BASE_DIR /
> "**/*.graphql"*).
>
> If approved, I would like to make a PR for the same.
>
> Regards
> Diptesh Choudhuri
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/0164ea90-33a2-4ee5-b6cd-df508b6ab013n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-developers/0164ea90-33a2-4ee5-b6cd-df508b6ab013n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAFNZOJMCxT4%2BGTNJqJbzr0_1pPTdtv-urNJqWR%2B%3DcJmQP0nEZw%40mail.gmail.com.
  • Add... Diptesh Choudhuri
    • ... 'Adam Johnson' via Django developers (Contributions to Django itself)
    • ... Tom Forbes
      • ... Diptesh Choudhuri

Reply via email to