0 How can I return a Decimal type from my backend GraphQL server and then parse it on my frontend client? I have a backend that returns a product with a price. The price is a custom scalar of Decimal type. The schema is like so: scalar Decimal type Product { id: ID! price: Decimal […]
0 My stack is: react v17.0.2 graphql v16.8.0 graphql-ws v5.14.0 urql v4.0.5 I use Hasura Actions to connect to REST API and I need to implement global error handling for all mutations. For example I have useAuthentication hook that returns a signOut promise: import { useMutation } from ‘urql’; export const useAuthentication = () => […]
-1 I’m trying to access my graphQL server on my production server but getting the CORS error. The request url is: https://mov****.at/graphql In my index.mjs where I start the Apollo server I have CORS defined as so: app.use( ‘/graphql’, cors({ origin: [‘https://mov***.at’, ‘https://mov***.at/graphql’, ‘https://studio.apollographql.com’] }), bodyParser.json(), expressMiddleware(server), ); And in my graphql.module.ts I have the […]
0 I have a list of articles, which have several dates attached to them : publishedAt (default date generated by strapi when article created) date (manual date user can enter to alter the default date) updateDate (manual date user can enter to print a second date, mentioning that the article was updated, and when) Basically […]
2 I got most of the tutorial up and running just fine, i.e subgraph creation, publishing subgraphs to Apollo Studio, and setting up the router. When I try to run a unified query on the supergraph, however, I get the following error, 2022-11-10T19:20:59.880454Z apollo-router/src/services/subgraph_service.rs:173 ERROR [trace_id=dc031984b0655a46580ce9ac8c7fd6e6] apollo_router::services::subgraph_service: fetch_error="hyper::Error(Connect, ConnectError("dns error", Custom { kind: Uncategorized, error: […]
0 We have next entity: public class Product { public Guid Id { get; set; } public string Name { get; set; } = string.Empty; [BsonExtraElements] public Dictionary<string, object?> AdditionalData { get; set; } = new(); } This entity can have many dynamic data that can be stored inside AdditionalData property. Using attribute BsonExtraElements we […]
1 Thanks in advance for help me. In my previous code GraphQL code was working but we want to migrate the Aws Amplify when we added the Amplify after words i am getting the data in interceptor but after that getting exception- "com.apollographql.apollo.exception.ApolloParseException: Failed to parse http response" "Parameter specified as non null is null […]
1 with Spring-GraphQl if I have following two schemas in the resources/graphql folder: schema1: type Query { bookById(id: ID): Book } type Book { id: ID name: String pageCount: Int author: Author } type Author { id: ID firstName: String lastName: String } schema2: type Query { personByName(name: String): Person } type Person { id: […]
15 I’m trying to implement GraphQL mutation for a "complex" object. Let’s say we have a Contact with three fields: firstName, lastName and address, which is object with one field street: Here is my python scheme implementation: class Address(graphene.ObjectType): street = graphene.String(description=’Street Name’) class AddressInput(graphene.InputObjectType): street = graphene.String(description=’Street Name’, required=True) class Contact(graphene.ObjectType): first_name = graphene.String(description=’First […]