Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

156
Vistas
Encountered a sub-selection on the query, but the store doesn't have an object reference. angular

I'm getting this error when I try to make some gql query:

enter image description here

I have tried to change the angular version, but I need to implement gql in this version. without upgrading :/

package.json

{
  "dependencies": {
    "@angular/cdk": "^5.2.5",
    "@angular/common": "^5.2.10",
    "@angular/compiler": "^5.2.10",
    "@angular/core": "^5.2.10",
    ...
    "rxjs": "^5.5.9",
    "zone.js": "^0.8.26",
    "apollo-angular": "^1.0.1",
    "apollo-angular-link-http": "^1.0.2-beta.0",
    "apollo-cache-inmemory": "^1.1.5",
    "apollo-client": "^2.2.0",
    "graphql": "^0.12.3",
    "graphql-tag": "^2.6.1"
  },
  "devDependencies": {
    "@angular/cli": "^1.7.4",
    "@angular/compiler-cli": "^5.2.10",
    "@types/node": "^9.6.6",
    "ts-node": "^4.1.0",
    "tslint": "^5.9.1",
    "typescript": "^2.8.3"
  }
}

app.module.ts

...
import { ApolloModule, Apollo } from 'apollo-angular';
import { HttpLinkModule, HttpLink  } from 'apollo-angular-link-http';
import { InMemoryCache } from 'apollo-cache-inmemory';

@NgModule({
  imports: [
    ...
    HttpClientModule,
    ApolloModule,
    HttpLinkModule
  ],
..
})
export class AppModule {

  constructor(
    apollo: Apollo,
    httpLink: HttpLink
  ) {
    apollo.create({
      link: httpLink.create({ uri: 'https://graphqlzero.almansi.me/api'}),
      cache: new InMemoryCache()
    });
  }
}

How can I solve this?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I solved this by upgrading apollo-cache-inmemory from 1.1.5 to 1.3.0

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda