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

API Migrate code and docs from other modules #596

Merged

Conversation

emteknetnz
Copy link
Member

@emteknetnz emteknetnz commented Aug 13, 2024

Issue silverstripe/silverstripe-admin#1799

Have validated that the front end schema is still usable:

composer require silverstripe/graphql-devtools

app/_config/graphql.yml

---
name: app-graphql
after: "*"
---
SilverStripe\Control\Director:
  rules:
    'graphql': '%$SilverStripe\GraphQL\Controller.default'

SilverStripe\GraphQL\Schema\Schema:
  schemas:
    default:
      src:
       - "app/_graphql"

app/_graphql/models.yml

Page:
  fields: '*'
  operations: '*'

dev/build flush=1

Test using graphql devtool

https://mysite.test/dev/graphql/ide

Test a query

query {
  readPages {
    nodes {
      title
      content
    }
  }
}

Test migrated versioning plugin

(Make draft changes on page ID = 2 in the CMS)

mutation {
  publishPage(id: 2) {
    id
  }
}

Refersh the CMS - page has been published

@emteknetnz emteknetnz marked this pull request as draft August 13, 2024 06:54
@emteknetnz emteknetnz force-pushed the pulls/6/standalone branch 3 times, most recently from 949baec to c47a600 Compare August 15, 2024 00:00
protected function setUp(): void
{
parent::setUp();
// CSRF token check is normally disabled for unit-tests
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed because after moving the location of this test in recipe-kitchen-sink, some other test was somehow interfering with this. This just sets up the Security token so that it's in the correct state for the test, and then resets it to however it was before

@emteknetnz emteknetnz force-pushed the pulls/6/standalone branch 2 times, most recently from 010927e to ca71747 Compare August 15, 2024 05:09
@emteknetnz emteknetnz changed the title MNT Move config from silverstripe/admin so that unit-tests pass API Migrate code and docs from other modules Aug 15, 2024
@emteknetnz emteknetnz force-pushed the pulls/6/standalone branch 7 times, most recently from 0ae1b20 to a8956ea Compare August 15, 2024 23:55
@emteknetnz emteknetnz marked this pull request as ready for review August 19, 2024 22:14
Copy link
Member

@GuySartorelli GuySartorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume those docs are all just directly copy/pasted, and haven't been altered at all?
They may need retouching when they get added back into the "other features" section but there's a separate card for that so that's okay.

_config/_versioned/config.yml Outdated Show resolved Hide resolved
_config/asset-admin.yml Show resolved Hide resolved
_config/versioned.yml Outdated Show resolved Hide resolved
@emteknetnz emteknetnz force-pushed the pulls/6/standalone branch 3 times, most recently from 0e4666b to fe8243f Compare August 22, 2024 01:55
Copy link
Member

@GuySartorelli GuySartorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM will merge when other PRs are happy

@emteknetnz emteknetnz force-pushed the pulls/6/standalone branch 2 times, most recently from 1020a68 to 39eb19e Compare August 30, 2024 00:07
Copy link
Member

@GuySartorelli GuySartorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-approved most recent changes

@GuySartorelli GuySartorelli merged commit ef4cbfe into silverstripe:6 Sep 2, 2024
4 of 10 checks passed
@GuySartorelli GuySartorelli deleted the pulls/6/standalone branch September 2, 2024 04:34
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.

2 participants