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

[WIP] Setcontent for front #488

Closed
wants to merge 52 commits into from

Conversation

stryxx
Copy link
Collaborator

@stryxx stryxx commented Jun 24, 2019

Checklist copied from #116. API won't be 100% the same, but functionality should be kept.

Basic

  • {contenttype}
  • {contenttype}/first/{number}
  • {contenttype}/last/{number}
  • {contenttype}/random/{number}
  • random is not going to work with Doctrine ORM queries, see answer on Stack Oveflow for info.
  • warning An alternative is to make a special Twig function/filter to handle random records.
  • Random should be refactored for better performance.

{contenttype}/{id} - it cannot be supported because id is not unique for every of contenttype. id is unique globally, so it not possible to get correct contenttype by id.

  • {contenttype}/{slug}

WHERE

  • {key}: {value}

  • {key}: {operator}{value} where operator is one of % < <= =

    warning Currently the operations will not work for numbers/dates/etc. because of JSON-encoded values.

WHERE advanced

  • {key}: {value1} || {value2} or {key}: {value1} && {value2}
  • "{key1} ||| {key2}": "{value1} ||| {value2}"
  • {key}: 'now' and other special datetime selectors (e.g. now, today, yesterday, last year, next thursday).

Special

  • limit {number}

  • orderby {field} or orderby -{field}

    warning This works for fields that have only a single value (think of it as a column)

  • Multiple sortorders (comma-separated)

  • returnsingle

  • printquery - I'm not sure if we should have this option

    warning Currently shows DQL. Let's see if we can show a runnable query instead.

Advanced

Pagination and Search are not implemented yet.

  • allowpaging
  • {contenttype}/search/{num} where filter: {term}
  • {ct1},{ct2},{ctN}/search/{num} where filter: {term}

Misc

  • Implementations for locales, taxonomies and relationships.
  • Proper integration with Config + ContentType data (such as max results per page).

New feature

  • Add getcontent function for twig allows to get content by direct GraphQL query.

@bobdenotter
Copy link
Member

Good to see you back in action on this! 👍

@stryxx
Copy link
Collaborator Author

stryxx commented Jun 24, 2019

I happy too ;) I'm back with full bag of good (imo :P) ideas ;)

@bobdenotter
Copy link
Member

I haven't commented much on this, but that doesn't mean i'm keeping an eye on it. ;-)

Just let me know when you think it's done, or ready for a second pair of eyes. 👍

@stryxx
Copy link
Collaborator Author

stryxx commented Jun 28, 2019

Thanks Bob, I'm going to let you know ;) It comes to the end ;)

@stryxx stryxx force-pushed the stryxx/refactor/setcontent-for-front branch from 04ab437 to 67c69fa Compare January 21, 2020 13:21
@bobdenotter bobdenotter marked this pull request as draft August 24, 2020 12:31
@bobdenotter
Copy link
Member

This PR has been lingering for two and a half years now. I think it's time to close it. 😔

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

2 participants