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 […]
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; […]
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 […]
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 […]
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 […]
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" […]
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 […]
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": […]
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 = […]
11 Is it possible to dynamically create a GraphQL schema ? We store the data in mongoDB and there is a possibility of new fields getting added. We do not want any code change to happen for this newly added field in the mongoDB document. Is there any way we can generate the schema dynamically […]