Tag: graphql
-
TypeError with Pothos Graphql and prisma-plugin
0 I am building a social app with nextjs for frontend and SSR, graphql-yoga server, and pothos for typesafe graphql and prisma for my db. I have followed all the example given in all their documentation for integration. However, I am getting a confusing error. ERR Error: Type Post must define one or more fields.…
-
Strawberry with social_django
0 How can I use social_django with strawberry graphql? With graphene, I inherited my strawberry.type from SocialAuthJWT I used in grapgene like this. class SocialAuth(graphql_social_auth.SocialAuthJWT): user = graphene.Field(UserType) @classmethod def resolve(cls, root, info, social, **kwargs): social.user.is_verified = True social.user.save() token = get_token(social.user) return cls(user=social.user, token=token) I’d like to log in with google. python python-3.x django…
-
Dynamic Python Function Generation from GraphQL Schema for API Requests
0 I’m looking for a method to dynamically generate Python functions that correspond to the queries and mutations defined in a GraphQL schema. After obtaining the schema, I want a system that can automatically create these functions, so I can simply import the generated code into my Python project and call the functions with the…
-
@apollo/client in React, passing header is not working
0 I am trying to pass header in @apollo/client useQueryQuery but it is not getting passed. Click on login button will call loginRequest. Its a REST call which is using Graphql. IMPORTANT -> in loginRequest is getting called at many places, some places need to pass the header and some place not. Below I added…
-
How to apply alias in @key field in apollo federation
0 type oPlayer @key(fields: "id") @key(fields: "name"){ id:ID name: String } extend type oPlayer @key(fields: "name") @key(fields: "PlayerId") { name: String @external PlayerId: ID @external } I am tring to resolve that field using PlayerId field with id but I am not able get data in referance resolver How to provide alias to "PlayerId:id" so…
-
React Admin with ra-data-hasura Error: Unknown resource . Make sure it has been declared on your server side schema
0 I’m using React Admin with GraphQL and ra-data-hasura. My problem is that the Introspection Query is made only when the app starts (user has role guest before login) and after login, the Introspection Query does not refetch, so I get errors for the resources that the logged in user should have access to. After…
-
BigCommerce REST / GraphQL – Adding item to cart for Customer, but calling the customer’s cart returns null
3 Either via using GraphQL or the Rest API, I create a cart for a customer (Either by sending customer_id in REST, or x-bc-customer-id in GraphQL). GraphQL: Create customer Impersonation Token and Create Cart Note: There’s also an Assign Cart to Customer mutation, but it only took a cart and didn’t do anything. REST: Create…
-
Graphql merge (combine) multiple queries into one?
22 I’m trying to combine multiple GraphQL queries into one query using JavaScript. I am looking for something like this: let query3 = mergeQueries(query1, query2); We won’t know beforehand which queries will be combined. Suppose I have queries like this: input query1: { post(id: 1234) { title description } } input query2: { post(id: 1234)…
-
How to download a file from a sharepoint online document library using GRAPH API to local folder
0 I am trying to get a test file (ian wheeler ms.png) from a SharePoint online document library in the sub folder General to download to a local folder of C:Temp using this question and answer microsoft-graph-download-file-via-rest-api I am able to make a call in postman to return my file contents to postman. The call…
-
How to resolve fetched fields graphql in spring without checking each field?
0 I’m learning GraphQL and decided to develop a small application using GraphQL, Spring Boot 3.1.3, Java 20, and the spring-boot-starter-graphql library. One of the main features of GraphQL is the ability to specify which fields are needed. I found a simple solution to implement this in Java using a field fetcher by checking if…