Tag: graphql
-
GraphQL HotChocolate file upload
0 How can I make a mutation call from a client and upload a file? I can do it in the editor (screen) But I cannot figure out how to make the same from a client var request = new GraphQLRequest { Query = query, Variables = new { id = "id" }, }; var…
-
GraphQL Code Generator with Apollo Client query with fragment type not detected
0 I have a simple Todo component that pulls all todos from my GraphQL endpoint. I am testing the fragment functionality using Apollo Client and GraphQL Code Generator to generate my types. Everything works, however the types for the fragment don’t (the data is there and displays correctly on the page). Below is the code…
-
Use custom decorator to add extra fields to TypeGraphQL @ObjectType class
0 Is there a way to create a custom class-level decorator that adds two parameters to a TypeGraphQL @ObjectType class? Example: @ObjectType() @Timestampable // custom decorator class User { @Field() email: string; } The @Timestampable decorator should add the createdAt and updatedAt props to the User class and the new props should show up in…
-
‘function’ object has no attribute ‘__func__’ issue with graphene django
0 TypeError: UserProcessOptionsNode fields cannot be resolved. ‘function’ object has no attribute ‘__func__’ class UserProcessOptionsNode(DjangoObjectType): client_configuration = GenericScalar() class Meta: model = api_models.UserProcessOptions interfaces = (relay.Node,) filter_fields = ("user",) @classmethod def get_queryset(cls, queryset, info): user_list = [] user_list.append(info.context.user) user_list.append(info.context.user.parent_user) userprocess = queryset.filter(user__in=user_list) return userprocess This issue is caused when I upgrade graphene-django from 2.15.0 to…
-
Using Actix Identity with Juniper GraphQL
1 I use Actix Identity with Cookie Policy to store user session and about to migrate from REST to GraphQL using Juniper. It would be great to create a login endpoint in GraphQL by using actix identity. Using Juniper in Actix, I’ve to move GraphQL request into web::block actix_web::web::block(|| move { let graphql_response = request.execute(&data,…
-
Postgraphile query argument error looking up related model
0 I have Postgraphile running and exploring the queries. Based on my schema.prisma, I expected to run a GraphQL query similar to the SQL query below. The SQL query is getting all active, unclaimed shifts that a worker is eligible for. How can I update the GraphQL query to filter Facility document requirements based on…
-
Unexpected Postgraphile query docs
0 I have Postgraphile running and exploring the queries. Based on my schema.prisma, I expected to run a GraphQL query similar to the SQL query below. Why do the Postgraphile queries in the docs appear differently than the GraphQL official docs? How do I proceed to build a GraphQL query? SQL query select * from…
-
Python GraphQL query with datetime variables
0 I’m trying to make a post request to a GraphQL API using Python3 and would like some parts of the query to be variables, without doing strange string manipulations with pasting. A good solution was something like this: import requests body = """ query ($first: Int, $occurredAtMin: DateTime){ app(id: "abc123") { events( first: $first…
-
400 response without any context in AWS Appsync where Lambda is a Data source
0 I’m getting the below response in AWS Appsync console, when i try to invoke graphql API. Request failed with status code 400 Query: query MyQuery { getUserData(inputArguments: $inputArguments) { __typename } } Variables: { "inputArguments": { } } I’m unable to debug it as Lambda is not being invoked. amazon-web-services aws-lambda graphql aws-appsync Share…