Tag: graphql
-
How to do HTTP-Only Cookie based authentication using flutter and graphql api
0 I am currently using graphql_flutter: ^5.1.2 for fetching Graphql api. On the host server there is used httponly cookie based authentication. In react there is http only option for cookie but on graphql_flutter i can’t find any option like that . I already test this system using dio client . But it doesn’t work…
-
Multi Level Query with GraphQL
0 I have 2 data tables: Project and Reason. Each Project with a unique ID has a bunch of reasons tied to it with their own unique ID. ProjectId is a foreign key to Reason. I want to pull up a single Reason with a given ProjectId and a ReasonId, but ReasonId exists in the…
-
Typegraphql field that can be generic for any custom type
0 I have a typegraphql base interface and want to be able to have object types use this class with their own relationship/attribute types. Is there a way to create a custom type that accepts any typegraphql objecttype? @InterfaceType() export abstract class BaseObjectType { @Field(type => ID) id: string; @Field() type: string; @Field() relationships?: any;…
-
How to stream file upload using python gql client for GraphQL
0 I am using python gql client to upload files using GraphQL request as below: https://gql.readthedocs.io/en/latest/usage/file_upload.html I am using asynchronous transport transport = AIOHTTPTransport(url=’YOUR_URL’) async with Client(transport=transport) as client: query = gql(”’ mutation singleUpload($file: Upload!) { singleUpload(file: $file) { id } } ”’) async def file_sender(file_name): async with aiofiles.open(file_name, ‘rb’) as f: chunk = await…
-
Python / asyncio: How to test GraphQL subscriptions?
0 I have created a GraphQL API on AWS AppSync and I need to run tests to verify things work as expected. I have implemented a command line API client in Python with gql to interact with the API: I can run queries ✅ I can run mutations ✅ I can start a subscription, run…
-
Auto update React.js front-end, when items added in DynamoDb
0 I’m developing a serverless AWS app. For the front-end I’m using react.js, for the back-end (REST API calls), I’m using Claudia API Builder (API Gateway & Lambdas) and I store my data in DynamoDB tables. Problem I want, whenever a user adds an item in a DynamoDB table, this to be shown automatically to…
-
Updating a single product in shopify app using Laravel and Graph QL
0 Im using Laravel to create a Shopify app. I have a mutation to create a product in shopify which works fine… private const CREATE_PRODUCTS_MUTATION = <<<‘QUERY’ mutation populateProduct($input: ProductInput!) { productCreate(input: $input) { product { id } } } QUERY; $response = $graph->query( [ "query" => self::CREATE_PRODUCTS_MUTATION, "variables" => [ "input" => [ "title"…
-
Limit graphql-codegen by kind
0 I am using graphql-codegen to generate types for an internal package to allow graph queries to interact with a very small subset of the massive schema of a larger application. The stitched-schema has identically named objects of different kinds, which is resulting in invalid TypeScript as it generating identically named objects. The duplicate named…
-
Dynamic Generation of GraphQL Client Sample query , Mutation ,..etc from the URL Endpoint Schema
0 I need to generate a dynamic Query,Mutation..etc.. for GraphQl client with the GraphQL Schema from URL Endpoint in java, GraphQl Query Generator Please refer the above image . There is GraphQL Query Generator (Chrome extension) which i need all the functionality in java, { "data": { "__schema": { "queryType": { "name": "Query" }, "mutationType":…
-
Junit test for suscription mapping not working
0 I have been referring to this https://docs.spring.io/spring-graphql/docs/current/reference/html/#testing to setup test for the subscriptionMapping However when I run the test the subscription start but does not emit the message and ends up in a hangup state. Can someone help me in what am I missing @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) class SubscriptionControllerTest { val client: WebSocketClient =…