#๐Ÿ”’ Need help. I wanna implement GraphQL Queries in python(Django -DRF) . Which solutions do you recco

4 messages ยท Page 1 of 1 (latest)

red sentinel
#

I am considering refactoring my frontend's(Angular) direct interaction with a Go-based Payment Serice (Forms some small service am using for my Dango backend) . The main backend is Django based . I intend to do this by implementing a proxy view in my Django to directly call the service . The goal is to centralize API calls and handle authentication, request formatting, and error management within the Django backend. I am evaluating whether to implement a custom Django proxy view or use Graphene for a GraphQL-based solution, or explore other potential frameworks or libraries that might simplify and optimize this interaction. The solution should reduce complexity on the frontend, improve security by managing tokens server-side, and provide a consistent API interface.I have like 40 queries and mutations in the FE , meaning if I was going to assign them individual action , that will mean an increased API surface area. I am asking if anyone has faced a similar challenge and which solutions did you go for .

Here is a sample look of one of my queries:
import { gql } from 'apollo-angular';

/** query PAYMENT_HISTORY */

const PAYMENT_HISTORY = gql`

query paymentHistory($userId: String!) {

paymentHistory(userId: $userId) {

transactions {

id

amount

date

status

description

}

totalCount

}

shadow jettyBOT
#

@red sentinel

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

shadow jettyBOT
#

@red sentinel

Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.