Giter Club home page Giter Club logo

Comments (8)

olragon avatar olragon commented on June 8, 2024

Post your GraphQL query and field config so I can dig deeper

from graphql_api.

d0t15t avatar d0t15t commented on June 8, 2024
{
  custom_entity__type_1 {
    title
    content_type_1 {
      nid
      title
      custom_entity__type_2 {
        title
        body
        date_field_with_end_date
      }
    }
  }
}

What do you mean exactly by field config? I've renamed the fields to better explain the entity and field types.

from graphql_api.

d0t15t avatar d0t15t commented on June 8, 2024

On a simpler query, the result is the same.

{
  node_article {
      field_test_date_field		
  }
}

"debugMessage": "Expected a value of type \"String\" but received: {\"value\":\"2016-12-31 23:00:00\",\"value2\":\"2018-05-31 22:00:00\",\"timezone\":\"Europe\\/Paris\",\"timezone_db\":\"UTC\",\"date_type\":\"datetime\"}",

from graphql_api.

olragon avatar olragon commented on June 8, 2024

What do you mean exactly by field config? I've renamed the fields to better explain the entity and field types.

You add a field date, you need select field type, field name, default value, timezone handling, start/end date .... What did you use for your field?

graphql_api resolve to string when we have no clue about schema types of given field type

from graphql_api.

d0t15t avatar d0t15t commented on June 8, 2024

What did you use for your field?

I add a field of type 'date' (https://www.drupal.org/project/date). Add a field name, default value of 'now'. Timezone handling set to the same as the website. Set field to record year, month, day, hour, and minute. When using only start-date, graphql_api returns a datetime string. When set to also record an end-date, then graphql_api returns the error mentioned above.

Thank you for looking into it!

from graphql_api.

Jehu avatar Jehu commented on June 8, 2024

@olragon any news here for using start/end date values in date field?

from graphql_api.

olragon avatar olragon commented on June 8, 2024

@Jehu I've been busy for the last week, try to fix in tomorrow

from graphql_api.

olragon avatar olragon commented on June 8, 2024

It should be fixed by c1590e8

from graphql_api.

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.