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

GraphQl: Normalize id based on the origin resource #2619

Merged
merged 3 commits into from
Mar 18, 2019

Conversation

soyuka
Copy link
Member

@soyuka soyuka commented Mar 15, 2019

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets api-platform/api-platform#1045
License MIT
Doc PR na

When querying the following:

{
  language(id: "/api/languages/1") {
    id, foo
  }
}

where Language has an output it should get the following response:

{"data":{"language":{"id":"\api\/languages\1","foo":"bar"}}}

Where the id matches the origin resource IRI.

ping @phryneas

@soyuka soyuka force-pushed the fix-output-id-normalization branch from 843d42d to 3ae9ef3 Compare March 15, 2019 11:08
@phryneas
Copy link

@soyuka works fine for me for the id property - with another followup bug (sorry!):
querying _id should return 1, but returns /api/languages/1

@soyuka soyuka force-pushed the fix-output-id-normalization branch from 3ae9ef3 to 62fb7a8 Compare March 15, 2019 13:14
@soyuka soyuka force-pushed the fix-output-id-normalization branch from 001c088 to 5cc5f17 Compare March 15, 2019 14:15
@teohhanhui teohhanhui force-pushed the fix-output-id-normalization branch 4 times, most recently from 791357b to 7a2708e Compare March 15, 2019 17:42
@soyuka soyuka force-pushed the fix-output-id-normalization branch from 7a2708e to 186b8e9 Compare March 18, 2019 14:24
@dunglas dunglas requested a review from teohhanhui March 18, 2019 14:26
@soyuka soyuka merged commit 5b7738e into api-platform:2.4 Mar 18, 2019
@soyuka
Copy link
Member Author

soyuka commented Mar 18, 2019

Many thanks @teohhanhui for the review !

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

Successfully merging this pull request may close these issues.

None yet

5 participants