Questions

  • Golang,gorm, postgress: invalid input is inserted

    0 when i perform request using https://localhost:8080/graphql end point I cant create user using mutation **the whole code:** package main import ( "fmt" "log" "net/http" "time" "github.com/graphql-go/graphql" "github.com/graphql-go/handler" "github.com/kaleabbyh/foodrecipie/config" _ "github.com/lib/pq" ) ** Note: the table users is succesfullly migrated using separate migration code having ‘User’ attributes** type User struct { ID int `gorm:"type:int;primary_key;identity(100,1)"` Name […]

  • How to use @live queries with graph-client?

    0 I have successfully configured graph-client, and following the documentation, I updated my .graphclientrc.yml including the following: plugins: – pollingLive: defaultInterval: 1000 This is the query I am trying to execute, which works just fine without the @live decorator: query GetOrderById($id: Bytes!, $historyOrder: OrderDirection!) @live { orders(where: { id: $id }) { id requester tokenAddress […]

  • Django app stopped working after installing django-graphql-auth

    -2 I was working on a Django application with GraphQL. I installed few required libraries. Everything seems to be working fine until I installed django-graphql-auth. Immediately after installing that, I’m getting below error. /Users/sukumar/IntellijProjects/venvs/plotcare_be/bin/python manage.py runserver Watching for file changes with StatReloader Exception in thread django-main-thread: Traceback (most recent call last): File "/opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.8/lib/python3.8/threading.py", line 932, […]

  • GraphQL hide certain fields from a response

    0 I am completely new to GraphQL – apologies if this is a stupid question. I have a Spring Boot application running GraphQL and have two endpoints as defined in my schema below: type Query { userById(id: ID): User getMe: User } type User { id: ID! email: String! firstName: String! lastName: String! } getMe […]

  • Contentful GraphQL endpoint: how to retrieve all entries of a content type

    3 { Post { name } } While trying to retrieve all the entries on a content type, it only gives error of: "Argument "id" of required type "String!" was not provided." Since id field is required. How do I get all entries of a content type then? Ref: https://www.contentful.com/developers/docs/references/graphql/ graphql contentful Share Follow asked […]

  • Update Relay Store from data saved on cache for Offline mode

    0 I’m developing a React native app, and want to restore data saved on cache when the user opens the app again, but it’s offline. I was able to get the latest store by using store.getSource() and save it as a serialised JSON to the device storage. I do also recover and unserialise it, but […]

  • Linux memcpy restrict keyword syntax

    9 I know that the restrict qualifier in C specifies that the memory region pointed by two pointers should not overlap. It was my understanding that the Linux (not SUS) prototype for memcpy looks like – void* memcpy(void *restrict dest, const void *restrict src, size_t count); However, when I looked at man7.org/memcpy it seems that […]

  • API Platform – GraphQL Schema mapping nullable Collection

    0 I’m pretty new to GraphQL, I’m building an API and a React App that connects to it. I need some help defining my GraphQL schema, I can’t find out what I’m doing wrong, but my GraphQL schema keeps bringing a mapped Collection as nullable… I’ve been following the official docs (https://api-platform.com/docs/core/graphql/) but can’t find […]

  • Does Ruby on Rails nullify session in Graphql Controller from outside domains?

    0 I have a Rails + graphql service running on a different domain, but it seems the session variable in graphql_controller.rb is nil. When I run my service locally, the session and context works as expected. Here’s an example: # in graphql controller def execute context = { session: session, test_variable: "has access" } result […]

  • GraphQL query for Sorare data

    0 I am trying to fetch data from sorare using their GraphQL API. I have managed to find the pattern to make a query as follows: import requests # Define the GraphQL query query = """ { player(slug: "nico-schlotterbeck") { firstName lastName position cardPositions id slug activeClub { name } age so5Scores(last: 5) { score […]