Tag: mysql
-
How to load rust struct vector data into GraphQL for query usage? OutputType error
0 After successfully creating a sample Rust+GraphQL project using async-graphql and axum and visualizing something in the playground, the time has come to actually use data for queries. I am using this for schema: let schema = Schema::build( Query, EmptyMutation, EmptySubscription ) .data(user_data) .finish(); where Query is: pub(crate) struct Query; where user_data is: pub struct…
-
Spring GraphQL return NULL
1 I want to create my own website in the form of a blog using Spring Boot and GraphQL API, but I don’t understand how to connect the database to GraphQL. When making a request through /graphiql, it returns NULL. I would appreciate any help and advice. I am using PHPMAdmin as database interface. Leave…
-
MySQL query data returns null GraphQL node.js
0 I’m having trouble handling MySQL query data in the resolve function of GraphQL objects. The data returns null in GraphiQL despite printing with console.log(). I’ve tried using JSON.parse(). I have the following code: Schema.js const graphql = require(‘graphql’); const queries = require(‘../mysql/queries’); const { GraphQLObjectType, GraphQLString, GraphQLSchema, GraphQLID, GraphQLInt, GraphQLFloat, GraphQLList, GraphQLNonNull } =…
-
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…
-
Software Engineer (NodeJS, NoSql, GraphQL) – Only W2 – StratG Inc – Sunnyvale, CA
StratG Inc Sunnyvale, CA $40+ Contract: W2 Skills software engineer nodejs GraphQL nosql API Cassandra MySQL MangoDB NoSql CRUD kafka Job Description Description: The Software Engineer position will be responsible for handson development as well as lead the development of Next Generation Enterprise solutions for Global ecommerce. SE will be responsible for application development in…
-
graphql single mutation with two authorizations
0 i have this mutation that updates tasks, but i don’t want to allow admins to modify the assigned_to field i want this to be only modifi-able by the super-admin, here’s how the code looks currently and just to for clarification i haven’t implmented any authorization or shield codeing yet, it’s my first encounter with…
-
TypeORM Entity Association Returns Null for Related Fields in GraphQL Nexus Schema
0 I’m currently building a GraphQL API using TypeORM and Nexus Schema. I’ve defined several entities with associations between them, such as Product, Brand, and User. The problem I’m facing is that when I query the Product entity using GraphQL, the related fields like category_id and brand_id are returning null values even though there is…
-
Knex query with .where() returns null in GraphQL
0 I’m trying to build a simple api with knex and apollo server, which is running, but the querys with where retuns null the server import { ApolloServer } from ‘apollo-server’ import knex from ‘./knex’ import { resolvers, typeDefs } from ‘./schema’ import { UserSQLDataSource } from ‘./schema/users/datasource’ const server = new ApolloServer({ typeDefs, resolvers,…
-
MySQL Database connection error for hasura cloud
0 I am using hasura cloud environment. For MySQL database, I am using MySQL workbench and created a database. I want to use this database in hasura environment. MySQL server is up and running on the port 3306. My JDBC Connection string is: jdbc:mysql://localhost:3306/employees?user=admin&password=password@123 After connecting, I got this error [ { "definition": "employees", "message":…
-
Make a select with max and min passing condition to each of the two
6 When a post is accessed, I need, in addition to returning the information of this posts, to return the previous one if it exists and the next one. I would like to know if there is a way to select MAX(id) and MIN(id) in a single query/select, passing a condition for each one of…