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, […]
0 Schema looks like this: type Query { userManagement: UserManagementQueries! } type UserManagementQueries { users(…): UserManagementUsersConnection } … So the query looks like: query { userManagement { users(ids: [123, 456]) } } How can I call this with delegateToSchema where I can only set a fieldName? How do I call a "sub"-field? return info.mergeInfo .delegateToSchema({ […]
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}`) […]
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 […]
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" […]
5 I’m working on a GraphQL extension for Visual Studio Code that implements syntax highlighting and auto-completion for GraphQL schemas and queries. It currently works on files ending with the .gql extension. However, a common GraphQL usage is to define inline queries inside JavaScript/TypeScript files, for instance: @connect(gql`user(id: 2) { name, email }`) function MyUIComponent({ […]
0 I am trying to setup my integration tests in Apollo Server 4 using Jest and typescript In my resolver code I have a function checkIfAuthorized which validates if a user has certain access. I am trying to mock this function and always return me a particular value I have a folder src/tests/integration where my […]