Tag: graphql
-
How to set a dummy filter handler for an extending field in hotchocolate 12 graphql?
4 I have an extending property needs to be filterable, however it fetches the data from a different data source. That means the default filtering won’t work, as the query cannot be translated properly. I want to create a dummy filtertype handler, then apply the filter manually based on the query context. public class User…
-
Nestjs: No type definitions were found with the specified file name patterns: “./**/*.graphql”
0 im trying to deploy Nestjs with Graphql backend server on Vercel, I am using schema first approach so there is a schema.graphql and graphql.ts in my src folder, you can see my code below, im following the nestjs docs to write my code, but it shows this error when deployed, can anyone help to…
-
Data not displayed in mongodb with graphql
0 graphql query running import { gql } from ‘@apollo/client’; const GET_CLIENTS = gql` query getClients { clients { id name email phone } } `; export { GET_CLIENTS }; import {gql} from ‘@apollo/client’; const DELETE_CLIENT = gql` mutation deleteClient($id: ID!) { deleteClient(id:$id) { id name email phone } } `;[enter image description here][1] export…
-
Camunda 7 graphql tomcat war deployment problem
0 I have checked out the code from https://github.com/camunda-community-hub/camunda-platform-7-graphql this. I am able to run it as a spring boot application. All the services of camunda along with camunda rest apis and graphql apis are working perfectly fine. However we have a specific need of deploying the camunda as a war file on tomcat 8.…
-
How do I get authentication to work on my resolvers in graphql social media app?
0 I am a new developer working on a project for a bootcamp, my project is a music social media application using graphql and mern stack. I am working on the resolvers for the cud operations and need to add authentication to my mutations for addPost, removePost, removeUser, addComment addFriend etc. When I run my…
-
Get git blame for full Github repository via api
2 I’d like to get the output of git blame <file> for all files in a repository recursively. I want to do this without cloning the repository first, by using Github’s GraphQL v4 api. Is this possible? I’ve managed to get a list of files via this query: query { repository(owner: "some owner", name: "some…
-
Prisma Datamodel: Primary key as a combination of two relational models
6 I have a problem in Prisma data modeling where I have to constrain that a user can submit only one review for a product. I have following design for the non-constrained situation. Should Customer and Product be combined into a primary key in ProductReview model, or should this constraint be imposed at the application…
-
How Can I Pass the Auth Middleware to the Apollo GraphQL Server
1 My App.js const mongoose = require(‘mongoose’); const dotenv = require(‘dotenv’); const { ApolloServer } = require(‘apollo-server’); const { startStandaloneServer } = require(‘@apollo/server/standalone’); const typeDefs = require(‘./apolloGraphql/schema’); const resolvers = require(‘./apolloGraphql/resolvers’); const auth = require(‘./Middleware/Auth’); dotenv.config({ path: ‘./config/.env’ }); const server = new ApolloServer({ typeDefs, resolvers, }); mongoose .connect(process.env.MONGOURI) .then((result) => { return server.listen(process.env.PORT, (req,…
-
Testing an addUser GraphQL/MongoDB mutation in Cypress
0 I’ve successfully created a Cypress test that creates a new token and user object. The problem is that, since I’ve hard coded the arguments accepted by the addUser mutation, the test only runs once. On a second run, the DB returns an error stating that the user already exists. I have a deleteUser mutation…