Tag: graphql
-
How to setup Hasura CLI?
0 I installed hasura CLI and I want to send data on my hasura cloud project. I tried different ways to launch hasura console but I don’t find the good way to launch it. Every time I have the same error and I don’t know how to solve it. You can see my Hasura CLI…
-
Why is this error, GraphQL query is unauthorized showing up in facebook?
1 I am not a developer and just a regular facebook user. Just now I tried to retrieve my 2 notifications in marketplace messenger and I got this error> GraphQL query is unauthorized This query is unauthorized because some field’s permission check has failed. I then tried to go to my own Facebook profile page…
-
How to fix GraphQL error – Not Authorized
2 I keep geting this error: Error: GraphQL error: Not Authorized! Code is: const queries = gql` query { mystreak } `; render() { return ( <Query query={queries}> {({ loading, error, data }) => { console.log(loading); console.log(error); console.log(data.mystreak); }} </Query> ) } App is built in React.js, and I am pretty new to GraphQL. Also…
-
How to serialize GraphQLEnum JSON in swift with Apollo version 1.3
0 I am trying to serialize data from a GraphQL Apollo request into JSON in order to decode into my swift model. However, when trying to serialize the data with an enum it fails. static func decodeUser(userJson:JSONObject)->UserQL?{ let decoder = JSONDecoder() print(userJson) guard let jsonData = try? JSONSerializationFormat.serialize(value: userJson) else { return nil } return…
-
Is it possible to query the Collection-Types of strapi
2 Is it possible to query a list of Collection-Types in Strapi? The following example: I have three Collection-Types: Restaurant Stores Events The client application does not know which Collection-Types exist and I want to query them dynamically: Example response { contentTypes: [ { name: "Restaurant" }, { name: "Stores" }, { name: "Events" }…
-
How to fix empty schema.gql file?
0 I want to connect my frontend with backend by apollo server. Schema is generated in backend main folder and i have following settings: app.module: GraphQLModule.forRoot<ApolloDriverConfig>({ driver: ApolloDriver, autoSchemaFile: "schema.gql", sortSchema: true, playground: false, }), main.ts: import { NestFactory } from ‘@nestjs/core’; import { GraphQLSchemaHost } from ‘@nestjs/graphql’; import { AppModule } from ‘./app.module’; import…
-
How to get comment Node ID of a discussion in GitHub Action with GitHub GraphQL API
0 I’m working on a GitHub Action triggered on the comment of a certain discussion (say org/repo/discussions/6#discussioncomment-7349183) being created or edited. I’d like the action to reply the comment like "your pipeline is running here" with a link. Then I found that there’s only GraphQL way to add a reply like: mutation { addDiscussionComment(input:{ discussionId:…
-
GraphQL codegen using GraphQLError type without importing it
0 This is my codegen config: ‘generated/graphql-sdk.ts’: { config: { rawRequest: true }, plugins: [ "typescript", "typescript-graphql-request", "typescript-operations", { ‘fragment-matcher’: { apolloClientVersion: 3, module: "es2015", useExplicitTyping: false } } ] }, For some reason the generated graphql-sdk doesn’t import GraphQLError causing the typing error, I end up needing to add it in manually. This only…
-
Bcrypt with graphQL and nestJS
0 In NestJS and GraphQL while using Bcrypt I had to use it with promise like below async getUser(email: String, password: String) { let user: User[] | User | null = await this.userModel.find({ email }); user = user.length && user[0]; if (user) { return bcrypt .compare(password, user.password) .then((res: any) => { if (res) { return…