Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_save mutation does not add field values to created entity #14

Open
Jehu opened this issue Jul 17, 2018 · 3 comments
Open

_save mutation does not add field values to created entity #14

Jehu opened this issue Jul 17, 2018 · 3 comments

Comments

@Jehu
Copy link

Jehu commented Jul 17, 2018

What i am doing wrong here?
The nodes/entities are created but only with title. All other fields are always empty (shown as null ).
(Also: Required fields are not validated if empty)

Test No. 1 for custom entity "fhp_shop_fishing_license_sold" of bundle "fhp_shop"

mutation createOrderline($license: fhp_shop_fishing_license_sold_input_type) {
  fhp_shop_fishing_license_sold_save(entity: $license) {
    id
    title
    field_shop_description {
      value
      format
    }
    field_shop_firstname
    field_shop_lastname
    field_shop_mail
  }
}


{
  "license": {
    "title": "Some title",
    "field_shop_description": "<p>This is the body text.</p>",
    "field_shop_firstname": "Max",
    "field_shop_lastname": "Mustermann",
    "field_shop_street": "Some Street Name",
    "field_shop_housenumber": "123",
    "field_shop_zipcode": 12345,
    "field_shop_city": "MyCity",
    "field_shop_mail": "[email protected]",
    "field_shop_birthdate": 222048000,
    "field_shop_prize": 54,
    "field_shop_license_reference": 17
  }
}

------
Result:

{
  "data": {
    "fhp_shop_fishing_license_sold_save": {
      "id": "50",
      "title": "Some title",
      "field_shop_description": null,
      "field_shop_firstname": null,
      "field_shop_lastname": null,
      "field_shop_mail": null
    }
  }
}

Test No. 2 for node type "faq"

This node type has no default body-field, but a "field_body" which is configured as formatted multiline.

mutation createEntity($entity: node_faq_input_type) {
  node_faq_save(entity: $entity) {
    nid
    title
    field_body {
      value
      summary
      format
    }
  }
}


{
  "entity": {
    "title": "Test FAQ #1",
    "field_body": "<p>Works?</p>"    
  }
}

----------
Result:

{
  "data": {
    "node_faq_save": {
      "nid": "99718",
      "title": "Test FAQ #1",
      "field_body": null
    }
  }
}
@Jehu
Copy link
Author

Jehu commented Jul 23, 2018

@olragon any ideas?

@Jehu
Copy link
Author

Jehu commented Jul 30, 2018

@olragon can you estimate when you can fix this?

@olragon
Copy link
Owner

olragon commented Aug 4, 2018

Hard week of work. Will fix in next 3-4 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants