Tag: #reactjs
-
Is an incremental state update a feasible approach?
0 I wrote a framework called React Server, that mimics React on the serverside. It features a few familiar concepts from React, like components, states, hooks, effects but on the serverside. A serverside component looks the following export const HelloWorldExample2 = () => { // The useState hook looks familiar? const [count, setState] = useState(0,…
-
Unable to connect to the Subscription server even after using graphql-ws
0 const {ApolloServer, gql} = require(‘apollo-server’); const { sequelize } = require(‘./models/index’) const contextMid = require(‘./util/contextMid’) // The GraphQL schema const typeDefs = require(‘./graphql/typeDefs’) // A map of functions which return data for the schema. const resolvers = require(‘./graphql/resolvers’) const server = new ApolloServer({ typeDefs, resolvers, context: contextMid }); server.listen().then(({url})=>{ console.log(`🚀 Server ready at ${url}`)…
-
Using React, AWS, Graphql, Dynamodb, how can I allow a user to share a link which will allow anyone who clicks on that link to view that user’s data?
0 I am new to AWS so any help will be appreciated! In many applications I see a feature which allows a logged in user to generate a shareable link which when clicked by anyone would display the user’s data. I was able to create unique links using the cognito user ID of a logged…
-
Issue with React App Strapi GraphQL Mutation for Creating Comments
0 I’m currently facing an issue with my React app where I’m attempting to create a new entry using GraphQL mutation. When I executed the following code in the Strapi GraphQL playground, it worked successfully, and the entry appeared on the Strapi dashboard: mutation{ createComment( data: { userName: "Jane" content: "fdfddf" post: 3 publishedAt: "2023-08-19T06:32:49.783Z"…
-
PWA Studio Create Review Mutation failed
0 I have this mutation to create the product review which is working fine but not able to integrate into the form does anyone how I can fix that ? mutation { createProductReview( input: { sku: "Samsung S21 Ultra", nickname: "Test", summary: "Great looking phone", text: "This phone looks and feels great.", ratings: [ {…
-
Undefined return value from getStaticProps
0 The value being returned from my getStaticProps in nextjs is undefined. I tried fetching data from a graphql endpoint and the return value was undefined when I console.log the value. This is the code block const graphQuery = new GraphQLClient(url); export const getStaticProps = async () => { const { course } = await…
-
Real-time Message Deletion Subscription Returns Null
0 I am currently working on implementing real-time message deletion in my GraphQL application. I have set up the necessary mutation and subscription resolvers, but I am encountering an issue where the messageDeleted subscription is returning null although message is delete for me but I want this is seen other user on the frontend when…
-
Field ‘orders’ doesn’t exist on type ‘QueryRoot’ Shopify
0 I cannot query orders in Shopify with GraphQL for ambiguous reason, I am using Shopify API version 2022-10, this is my query: query { orders(first: 10) { edges { node { id } } } } This is what I get { "errors": [ { "message": "Field ‘orders’ doesn’t exist on type ‘QueryRoot’", "locations":…