Giter VIP home page Giter VIP logo

graphene-django-subscriptions's Introduction

Banner

Night Coding

Hi there, I'm Ernesto

👨🏽‍💻   A self-motivated tech enthusiast and Python 🐍  evangelist. Actually working as Senior Backend Developer at ISN with Python, Django, Docker, GraphQL and PostgreSQL.

Striving to maintain the perfect balance between It doesn't work...! Why? vs It works...! Why?.

🌱   I'm currently learning Flutter and loving it ❤

👨🏽‍🎓   One of my biggest motivations is to learn.

😍   I love attending developer meetings, conferences, holding workshops, and sharing knowledge.

🤩   Perfect job would be 70% Backend, 20% DevOps, and 10% Frontend.

🙋‍♂️   Pronouns: He/Him

Night Coding

🛠  Tech Stack

Python  Rust  Django  FastAPI  Flask  Docker  GraphQL 
JavaScript  HTML  CSS  React  React Native  Bootstrap  TailwindCSS 
Git  GitHub  Gitlab  Google Cloud Jira 
PyCharm  Visual Studio Code  PostgreSQL 

⚙️  GitHub Analytics

✨ Featured project

🤝🏻  Connect with Me

GitHub Ernesto LinkedIn Email

visitor badge

graphene-django-subscriptions's People

Contributors

eamigo86 avatar mrabedini avatar tonythomas01 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

graphene-django-subscriptions's Issues

serializers

How you do the serializers of users and group ?

'AnonymousObservable' object has no attribute 'errors'

Hi. I need to add subscriptions to my graphene-django project. But I've landed with the following error: 'AnonymousObservable' object has no attribute 'errors' raised in graphene_django/views.py", line 164, in get_response. Have you met this error before? Or do you have any thoughts how can it be resolved?

Module import error

In your README file, you said to:
from graphene_django_subscriptions.subscription import Subscription
But:
ModuleNotFoundError: No module named 'graphene_django_extras.subscription'

Subscriptions are not allowed.

I followed the example and I got
Subscriptions are not allowed. You will need to either use the subscribe function or pass allow_subscriptions=True
What am I missing?

Channels 2

Hello,

Would it be possible to have an example of use with channels 2 ?

Also, I have seen that from graphene_django_subscriptions.consumers import GraphqlAPIDemultiplexer is not accurate in the documentation as it uses subscriptions instead of consumers.
The documentation is unclear about how to use the new api.

Thanks in advance.

Not being maintain?

The last commit is last year and major GraphQL Django Libraries doesn't support this anymore.

AttributeError: 'NoneType' object has no attribute 'get'

Please help me figure this out. i have successfully configured this package to work with the graphiql query browser interface. however i cannot get any responses when i send a message over the websocket. am using subscriptions-transport-ws on the client side and graphene django on the backend.
here is my setUpSubscription from the client environment file

const setupSubscription = (config, variables, observer, operationName, context) => {
    const query = config.text;
    const subscriptionClient = new SubscriptionClient(websocketurl, {
        reconnect: true,
        timeout: 20000,
        connectionCallback: (message) => {
            variables.channelId = message.channel_id;
            console.log(channelId);
        }
    });
    variables.operationName = 'projectSubscription';
    console.log(variables);

   subscriptionClient.onConnected((message) => {
        console.log(`connected...${message}`);
        const client = subscriptionClient.request({ query, variables }).subscribe({
            next: (result) => {
                observer.onNext({ data: result });
            },
            complete: (result) => {
                observer.onComplete(console.log(result));
            },
            error: (error) => {
                observer.onError(error);
            }
        });
        return {
            dispose: client.unsubscribe
        };
    });

};

for example when i send the message {"id":"1","type":"start","payload":{"query":"subscription projectSubscription(\n $channelId: String!\n) {\n projectSubscription(operation: SUBSCRIBE, action: ALL_ACTIONS, channelId: $channelId, data: [ID, PROJECT_CODE, NAME, LOCATION_ID, ALLOCATED_AMOUNT, PROJECT_TYPE_ID, PROJECT_VALUE, PROJECT_STATUS_ID, PROJECT_MANAGER_ID, VENDOR_ID, EXPENDED_AMOUNT, DURATION_IN_DAYS, START_DATE, END_DATE, CREATED_AT, UPDATED_AT]) {\n ok\n error\n stream\n operation\n action\n }\n}\n","variables":{"channelId":"ugJtifiitN!INdeqQJmLW","operationName":"projectSubscription"}},"stream":"projects"}
i dont get any response from the server but i see the error AttributeError: 'NoneType' object has no attribute 'get' from the deserialise method in the mixins module. how can i ensure i get a response just like when i execute the subscription from the graphql browser interface? Please help.

Django model serializer 'only_fields' not included in the payload

I was having issues trying to get the fields that it included in the the data attribute of the subscription to populate in the payload. Curiously, I was able to get the id to show up, but I couldn't get any of the other attributes of my model to populate in the payload. After inspecting the source code and removing the modifications to the field values (stripping '' and changing to uppercase) in line 78 of subscription.py I was able to fix the problem and get the fields that I wanted in the payload. I'm assuming that there was a reason for including the change to upper and removing the '', but I just wanted to inform you that it was causing a bug for me. I really appreciate the work you have done and hope you can create a fix for this issue in the future!

What about v0.0.9?

On pypi.org there is a version 0.0.9 which does not correspond to anything in this repo. Where is the source code for that?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.