GithubHelp home page GithubHelp logo

Comments (3)

syrusakbary avatar syrusakbary commented on June 14, 2024

Hi @thedrow, you should use the Viewer type directly, like:

ds.Viewer.allCustomers

Let me know if that doesn't work! :)

from gql.

thedrow avatar thedrow commented on June 14, 2024

That works but I'm still unable to construct the rest of the query or execute it using the DSL API.

> ds.query(ds.Viewer.allCustomers)
GraphQLError: Cannot query field "allCustomers" on type "Query". Did you mean "getCustomer"?

Adding the where clause with the proper type also seems impossible. I can access ds.CustomerWhereArgs,enrollment_secret but I can't access any of its other properties.

In [70]: ds.CustomerWhereArgs.enrollment_secret.field
Out[70]: <graphql.type.definition.GraphQLInputObjectField at 0x7f7950ba5750>

In [71]: ds.CustomerWhereArgs.enrollment_secret.field.description
Out[71]: 'Filter results for on the enrollment_secret field.'

In [72]: ds.CustomerWhereArgs.enrollment_secret.field.type
Out[72]: <graphql.type.definition.GraphQLInputObjectType at 0x7f795199ea08>

In [73]: ds.CustomerWhereArgs.enrollment_secret.field.type.description

In [74]: ds.CustomerWhereArgs.enrollment_secret.field.type.fields
Out[74]: 
OrderedDict([('eq',
              <graphql.type.definition.GraphQLInputObjectField at 0x7f7950ba5948>),
             ('ne',
              <graphql.type.definition.GraphQLInputObjectField at 0x7f7950ba5990>),
             ('gt',
              <graphql.type.definition.GraphQLInputObjectField at 0x7f7950ba59d8>),
             ('gte',
              <graphql.type.definition.GraphQLInputObjectField at 0x7f7950ba5a20>),
             ('lt',
              <graphql.type.definition.GraphQLInputObjectField at 0x7f7950ba5a68>),
             ('lte',
              <graphql.type.definition.GraphQLInputObjectField at 0x7f7950ba5ab0>),
             ('between',
              <graphql.type.definition.GraphQLInputObjectField at 0x7f7950ba5af8>),
             ('notBetween',
              <graphql.type.definition.GraphQLInputObjectField at 0x7f7950ba5b40>),
             ('in',
              <graphql.type.definition.GraphQLInputObjectField at 0x7f7950ba5b88>),
             ('notIn',
              <graphql.type.definition.GraphQLInputObjectField at 0x7f7950ba5bd0>),
             ('like',
              <graphql.type.definition.GraphQLInputObjectField at 0x7f7950ba5c18>),
             ('notLike',
              <graphql.type.definition.GraphQLInputObjectField at 0x7f7950ba5c60>),
             ('isNull',
              <graphql.type.definition.GraphQLInputObjectField at 0x7f7950ba5ca8>)])

I'm also not sure how to use it with args().

from gql.

Cito avatar Cito commented on June 14, 2024

This looks outdated. If DSL is changed or features are added, it should be documented first (#82).

from gql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.